Package Info

ghc-effect-handlers


A library for writing extensible algebraic effects and handlers. Similar to extensible-effects but with deep handlers


Development/Libraries/Haskell

This is an extensible effects library for Haskell taking inspiration from the Eff language <http://www.eff-lang.org/&gt;.

See these papers for the ideas and theory behind the library:

Implementation wise it's most close to 'extensible-effects' <http://hackage.haskell.org/package/extensible-effects&gt; (also see the Extensible Effects paper) but it implements deep handlers instead of shallow.

' import Control.Effects.Cont.Eff import Control.Effects.Cont.Reader import Control.Effects.Cont.Exception

program = do &#32;&#32;v <- ask &#32;&#32;if v < 15 &#32;&#32;then throw $ show v &#32;&#32;else return (v+1)

run n = runPure . handle exceptionHandler . handle (readerHandler n)

res :: Integer -> Either String Integer res n = run n program '.


License: MIT
URL: https://hackage.haskell.org/package/effect-handlers

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
0.1.0.8-bp150.1.3 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • x86-64
  • ghc-effect-handlers
  • ghc-effect-handlers-devel