freer-effects-0.3.0.0: Implementation of effect system for Haskell.

Copyright(c) 2016 Allele Dev; 2017 Ixperta Solutions s.r.o.
LicenseBSD3
Maintainerixcom-core@ixperta.com
Stabilitybroken
PortabilityGHC specific language extensions.
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Freer.Fresh

Description

Composable handler for Fresh effects. This is likely to be of use when implementing De Bruijn naming/scopes.

Using http://okmij.org/ftp/Haskell/extensible/Eff1.hs as a starting point.

Synopsis

Documentation

data Fresh a where Source #

Fresh effect model.

Constructors

Fresh :: Fresh Int 

fresh :: Member Fresh effs => Eff effs Int Source #

Request a fresh effect.

runFresh' :: Eff (Fresh ': effs) a -> Int -> Eff effs a Source #

Handler for Fresh effects, with an Int for a starting value.