mirror of
https://github.com/coot/free-category.git
synced 2024-11-22 16:22:05 +03:00
Fix typos
This commit is contained in:
parent
963b3f1221
commit
b4a67b3489
@ -14,7 +14,7 @@ Free arrows and free Kleisli categories are also included.
|
||||
Free categories are useful to model state machines in a simple yet type safe
|
||||
manner. For that purpose `Kleisli` categories are a very useful target which
|
||||
allows to include monadic computations. This package contains a useful
|
||||
generalisation of `Kliesli` categories captured by `EffectCategory` class
|
||||
generalisation of `Kleisli` categories captured by `EffectCategory` class
|
||||
(categories with effects), and a (free) transformer which lifts a category to
|
||||
a category with effects.
|
||||
|
||||
@ -29,8 +29,8 @@ Check performance characteristics of various representations:
|
||||
## Resources
|
||||
* [LoginStateMachine](https://github.com/coot/free-category/blob/master/examples/src/LoginStateMachine.hs):
|
||||
based on [State Machines All The Way
|
||||
Down](https://www.youtube.com/watch?v=xq7ZuSRgCR4) by Edwin Bradly, 2017 You
|
||||
can run it with `cabal new-run examples:login-state-machine`.
|
||||
Down](https://www.youtube.com/watch?v=xq7ZuSRgCR4) by Edwin Bradly, 2017.
|
||||
You can run it with `cabal new-run examples:login-state-machine`.
|
||||
* Read more [here](https://coot.me/posts/finite-state-machines.html) on
|
||||
a simple example of a finite state machine encoded using a free category
|
||||
using a simple GADT.
|
||||
|
@ -20,7 +20,7 @@ module Control.Arrow.Free
|
||||
, A (..)
|
||||
, fromA
|
||||
, toA
|
||||
-- * Free interface re-exports
|
||||
-- * Free interface re-exports
|
||||
, FreeAlgebra2 (..)
|
||||
, wrapFree2
|
||||
, foldFree2
|
||||
@ -116,7 +116,7 @@ instance FreeAlgebra2 Arr where
|
||||
-- Free arrows using CSP style
|
||||
--
|
||||
|
||||
-- | Free arrow using CPS sytle.
|
||||
-- | Free arrow using CPS style.
|
||||
--
|
||||
newtype A f a b
|
||||
= A { runA :: forall r. Arrow r
|
||||
|
@ -73,8 +73,8 @@ liftEffect :: ( Monad m
|
||||
=> tr a b -> EffCat m (cat tr) a b
|
||||
liftEffect = liftFree2 . liftFree2
|
||||
|
||||
-- | Fold @'FreeLifing'@ category based on a free category @'cat' tr@ (e.g.
|
||||
-- @'Cat' tr@) using a functor @tr x y -> c x y@.
|
||||
-- | Fold @'FreeLifting'@ category based on a free category @'cat' tr@ (e.g.
|
||||
-- @'C' tr@) using a functor @tr x y -> c x y@.
|
||||
--
|
||||
foldNatEffCat
|
||||
:: ( Monad m
|
||||
@ -89,7 +89,7 @@ foldNatEffCat
|
||||
-> c a b
|
||||
foldNatEffCat nat = foldNatFree2 (foldNatFree2 nat)
|
||||
|
||||
-- | Functor from @(->)@ category to @'Kleisli' m@. If @m@ is 'Identity' then
|
||||
-- | Functor from @(->)@ category to @'Kleisli' m@. If @m@ is 'Identity' then
|
||||
-- it will respect 'effect' i.e.
|
||||
-- @'liftKleisli' ('effect' ar) = 'effect' ('liftKleisli' \<$\> ar)@.
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user