Skip to content

Instantly share code, notes, and snippets.

@hanshoglund
Last active May 12, 2018 17:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hanshoglund/d3013b0569e6e71693de758a1dd02b6f to your computer and use it in GitHub Desktop.
Save hanshoglund/d3013b0569e6e71693de758a1dd02b6f to your computer and use it in GitHub Desktop.
Better effect systems

Effects

The classics http://hackage.haskell.org/package/extensible-effects http://hackage.haskell.org/package/free http://hackage.haskell.org/package/mtl (http://hackage.haskell.org/package/operational, first freer monad implementation) TODO find link of implementing freer with Free + Free.Ap instead of (Free + left kan)

Algebraic effects in Multicore OCaml OCaml language extension, looking very much like a standard free encoding https://github.com/kayceesrk/effects-examples/blob/master/aio/aio.ml

Eff, language with built-in algebraic effects and handlers http://www.eff-lang.org/ Paper: http://www.eff-lang.org/handlers-tutorial.pdf

Another effect implementation (similar to Eff) https://github.com/edofic/effect-handlers

MTL with tags: https://int-index.github.io/ether/

Compositional interpreters as higher order CT (and the Inject class, see also purescript-inject): http://degoes.net/articles/modern-fp-part-2

Another extensible-eff implementation based on the freer monad (with nice free encodings of standard effects) http://hackage.haskell.org/package/freer-effects-0.3.0.1

Free monad benchmark: https://rawgit.com/feuerbach/freemonad-benchmark/master/results.html#grokularation

Data types a la carte (origin of the final tagless algebra style and more) http://www.cs.ru.nl/~W.Swierstra/Publications/DataTypesALaCarte.pdf

Various monad transformer links: https://github.com/lotz84/haskell/blob/master/docs/monad-transformers.md

Alternative final tagless encoding (instead of mtl classes) https://github.com/feuerbach/monad-classes

Good summary (this one strongly preferring tagless over free) https://www.youtube.com/watch?v=qaAKRxO21fU

MTL and Finally tagless: https://www.youtube.com/watch?v=JxC1ExlLjgw

(Tangent: Monads and coproducts) http://www.informatik.uni-bremen.de/~cxl/papers/icfp02.pdf How does this relate to the coproduct/free encoding?

The world's fastest extensible effects framework https://www.schoolofhaskell.com/user/fumieval/extensible/the-world-s-fastest-extensible-effects-framework

Free monads in CT (basic) https://paolocapriotti.com/blog/2013/11/20/free-monads-part-1/

A categorical view of computational effects http://www.math.jhu.edu/~eriehl/compose.pdf CT oriented view on "monads for computation", relation to Lawvere theories

Relation to session types http://dl.acm.org/citation.cfm?id=2976034

Cofree interpreters (PureScript) https://www.youtube.com/watch?v=klpKIs84_bU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment