https://github.com/bts/free-transformers
Experimenting with "free transformers" in Haskell
https://github.com/bts/free-transformers
effects free free-monad haskell interpreter modularity onion-architecture
Last synced: 3 months ago
JSON representation
Experimenting with "free transformers" in Haskell
- Host: GitHub
- URL: https://github.com/bts/free-transformers
- Owner: bts
- License: bsd-3-clause
- Created: 2016-10-20T18:29:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-01T16:13:52.000Z (almost 9 years ago)
- Last Synced: 2025-06-09T13:05:53.118Z (8 months ago)
- Topics: effects, free, free-monad, haskell, interpreter, modularity, onion-architecture
- Language: Haskell
- Size: 25.4 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
*UPDATE*: I've worked this into a library in a private project, that abstracts over `Free` and CPS'd `F` for efficiency. If you'd be interested in using this, let me know and I can release a package.
----------------------
An example Haskell implementation of the
"[free transformers](http://degoes.net/articles/modern-fp-part-2)" approach to
building modular programs by composing layers of `Free` interpreters.
This was adapted from a combination of:
- http://mpickering.github.io/posts/2014-12-20-closed-type-family-data-types.html
- http://degoes.net/articles/modern-fp
- http://degoes.net/articles/modern-fp-part-2
- https://github.com/notxcain/onion-architecure
- https://gist.github.com/jdegoes/97459c0045f373f4eaf126998d8f65dc
In this example, the code does not (yet) go so far as to abstract over the
"computational context" (i.e. sequential/`Free` vs parallel/`FreeAp`) --
everything is currently sequential.
If you have any tips/ideas/fixes, please let me know!