extensible-effects-1.7.1.1: An Alternative to Monad Transformers

Safe HaskellTrustworthy
LanguageHaskell98

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.