extensible-effects-1.9.1.0: An Alternative to Monad Transformers

Safe HaskellTrustworthy
LanguageHaskell2010

Control.Eff.Fresh

Description

Create unique Enumerable values.

Synopsis

Documentation

newtype Fresh i v Source

Create unique Enumerable values.

Constructors

Fresh (i -> v) 

Instances

Functor (Fresh i) 
Typeable (* -> * -> *) Fresh 

fresh :: (Typeable i, Enum i, Member (Fresh i) r) => Eff r i Source

Produce a value that has not been previously produced.

runFresh :: (Typeable i, Enum i) => Eff (Fresh i :> r) w -> i -> Eff r w Source

Run an effect requiring unique values.