extensible-effects-1.11.1.0: An Alternative to Monad Transformers
Control.Eff.Fresh
Description
Create unique Enumerable values.
Synopsis
newtype Fresh i v Source #
Constructors
Instances
Methods
fmap :: (a -> b) -> Fresh i a -> Fresh i b #
(<$) :: a -> Fresh i b -> Fresh i a #
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.