mirror of
https://github.com/coot/free-category.git
synced 2024-11-23 09:55:43 +03:00
Free categories, free arrows and free categories with monadic actions
20d61b2355
* Efficient representation of free category Using type aligned real time queues (Okasaki, 'Purely Functional Data Structures') to represent catanable type allign lists (free categories). Composition is O(1) and right fold is O(n), where n is number of transitions. * Bump version to 0.0.3 Make it compile on ghc802. * Updated CI configuration |
||
---|---|---|
.circleci | ||
examples | ||
nix | ||
src/Control | ||
.travis.yml | ||
cabal.project | ||
ChangeLog.md | ||
default.nix | ||
free-category.cabal | ||
LICENSE | ||
README.md | ||
shell.nix |
Free Category
This package contains efficient free category presentations.
Free categories are useful to model state machines in a simple yet type safe
way and for that purpose Kleisli
categroies are a very useful target which
allows to include monadic computations. This packge contains a useful
generalisation of Kliesli
categories captured by EffCategory
class
(effectful categories), and a (free) transformer which lifts a category to
an effectful one.
Some examples
- LoginStateMachine:
based on State Machines All The Way
Down by Edwin Bradly, 2017 You
can run it with
cabal new-run examples:login-state-machine
. - Read more here on a simple example of a finite state machine encoded using a free category using a simple GADT.
- Another example.
- Blog post on Keleisli categories.