From e2fd32742a3b1bc9cd0922ff1610395af8800409 Mon Sep 17 00:00:00 2001 From: Aldwin Vlasblom Date: Sat, 16 May 2020 11:20:08 +0200 Subject: [PATCH] Version 2.0.2 --- LICENSE | 2 +- README.md | 14 +++++++------- package.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LICENSE b/LICENSE index 56bb7cd..b22b001 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ The MIT License (MIT) -Copyright (c) 2019 Aldwin Vlasblom +Copyright (c) 2020 Aldwin Vlasblom Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index fb84992..c154279 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ fork (console.error) ## API -### `Hook :: ((b -⁠> a) -⁠> a) -⁠> Hook a b` +#### `Hook :: ((b -⁠> a) -⁠> a) -⁠> Hook a b` Tags a function awaiting a callback (such as the value returned by [Fluture's `hook`][hook]) as a "Hook". @@ -49,15 +49,15 @@ Tags a function awaiting a callback (such as the value returned by Hook (Future.hook (myResourceAcquisition) (myResourceDisposal)); ``` -### `hook :: Future a b -⁠> (b -⁠> Future c d) -⁠> Hook (Future a e) b` +#### `hook :: Future a b -⁠> (b -⁠> Future c d) -⁠> Hook (Future a e) b` `hook (m) (f)` is the equivalent of `Hook (Future.hook (m) (f))`. -### `acquire :: Future a b -⁠> Hook (Future a d) b` +#### `acquire :: Future a b -⁠> Hook (Future a d) b` Creates a Hook without the need for a disposal function. -### `runHook :: Hook b a -⁠> (a -⁠> b) -⁠> b` +#### `runHook :: Hook b a -⁠> (a -⁠> b) -⁠> b` Given a Hook and a callback, runs the Hook, returning the callbacks' return value. For Hooks created from Fluture's hook, this means a Future is @@ -66,18 +66,18 @@ retured. This function can also be thought of as "untagging" a [`Hook`](#Hook): `runHook (Hook (h)) = h`. -### `ParallelHook :: Hook a b -⁠> ParallelHook a b` +#### `ParallelHook :: Hook a b -⁠> ParallelHook a b` Construct a ParallelHook using a Hook. `ParallelHook a` has a Functor instance, and `ParallelHook (Future a b)` has an Applicative instance with parallel behaviour. -### `sequential :: ParallelHook a b -⁠> Hook a b` +#### `sequential :: ParallelHook a b -⁠> Hook a b` Converts a ParallelHook to a normal Hook. -### `hookAll :: Array (Hook (Future a b) c) -⁠> Hook (Future a b) (Array c)` +#### `hookAll :: Array (Hook (Future a b) c) -⁠> Hook (Future a b) (Array c)` Combines resources from many hooks into a single hook in parallel, given that the eventual consumption of this new hook will return a Future. diff --git a/package.json b/package.json index 9b32292..3c4af07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fluture-hooks", - "version": "2.0.1", + "version": "2.0.2", "description": "Fantasy Land Monad and Alternative instances for Fluture's hook", "tags": [ "fluture",