Cleff.Fresh
Contents
data Fresh u :: Effect where Source #
An effect capable of generating unique values. This effect can be useful in generating variable indices.
Constructors
fresh :: Fresh u :> es => Eff es u Source #
freshIntToState :: Eff (Fresh Int ': es) ~> Eff (State Int ': es) Source #
Interpret a Fresh Int effect in terms of State Int.
Fresh Int
Fresh
Int
State Int
State
runFreshUnique :: IOE :> es => Eff (Fresh Unique ': es) ~> Eff es Source #
Interpret a Fresh Unique effect in terms of IO actions.
Fresh Unique
Unique