effect-handlers

Version 0.1.0.8 revision 0 uploaded by edofic.

Package meta

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

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

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 (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
  v <- ask
  if v < 15
  then throw $ show v
  else return (v+1)

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

res :: Integer -> Either String Integer
res n = run n program
Author
Andraz Bajt, Blaz Repas
Bug reports
https://github.com/edofic/effect-handlers/issues
Category
Control
Copyright
n/a
Homepage
https://github.com/edofic/effect-handlers
Maintainer
Andraz Bajt <andraz@bajt.me>
Package URL
n/a
Stability
experimental

Components