Open Icelandjack opened 3 years ago
Now I remember, as a consequence we can derive "MonadFree Identity Fresh
" for our little friend down there:
type Fresh :: Type -> Type
newtype Fresh a = Fresh (Integer -> (a, Integer))
deriving
(Functor, Applicative, Monad, MonadFix, MonadState Integer, MonadFree Identity)
via State Integer
I was wondering if State Integer
could make sense as a MonadFree
instance which lead me to think about Identity
..
A could of 'trivial' instances, I just wrote them to write them so I have no use for them