Safe Haskell | None |
---|---|
Language | Haskell2010 |
Extensible effects. Minimal boilerplate. (Weakened inference).
See Vinyl.Effects.Example for a detailed tutorial.
Dependencies:
- the
free
package, forFree
(which transforms a functor into a monad) andCofree
(which transforms a functor into a comonad). - the
vinyl
package, for (TODO)CoRec
(an n-ary, un-nested sum type) andRec
(an n-ary, un-nested product type).
Concepts (necessary only for contributing to the library, not using it):
for composing domain-specific languages and interpeters (parts 1 to 5):
- http://dlaing.org/cofun/posts/free_and_cofree.html
- http://dlaing.org/cofun/posts/monad_transformers_and_comonad_transformers.html
- http://dlaing.org/cofun/posts/coproducts_for_free_and_products_for_cofree.html
- http://dlaing.org/cofun/posts/pairing_and_io.html
- http://dlaing.org/cofun/posts/pairing_over_the_network.html
- (this series a tour-de-force, read it!).
for "extensible records":
for "free monads":
- <> TODO tekmos blog
for "extensible effects":
- <> TODO ocharles
for
mtl
:- <> TODO
Reverse Dependencies:
- packdeps.haskellers.comreversevinyl-effects
- TODO workflow-types uses this package to maximize the effects the
platform-independent monad provides, while still preserving the richer effects
the platform-specific monads provide (in workflow-linux, workflow-osx, and
workflow-windows). e.g.
OSX
can easily access the clipboard viabash
.
Extensions:
- The effects as a type-level set, not a type-level list (from GHC.TypeLits); i.e. the items are unique. (Currently, I think the duplicates are ignored).
- "extensible interpreters" via cofree comonads.
(The original motivation for this package only needed the
Language
to be extensible).
Existing Alternatives:
- effects: uses
-XOverloadedInstances
. bad inference? - <> romansch:
- <> ocharles:
- <> mtl: doesn't compose
Documentation
module Vinyl.Effects.Language
module Vinyl.Effects.Interpreter
module Vinyl.Effects.Types
module Data.Vinyl
module Vinyl.CoRec