{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module Control.Effect.Fresh
(
Fresh(..)
, fresh
, Algebra
, Has
, run
) where
import Control.Algebra
import Data.Kind (Type)
data Fresh (m :: Type -> Type) k where
Fresh :: Fresh m Int
fresh :: Has Fresh sig m => m Int
fresh :: forall (sig :: (* -> *) -> * -> *) (m :: * -> *).
Has Fresh sig m =>
m Int
fresh = forall (eff :: (* -> *) -> * -> *) (sig :: (* -> *) -> * -> *)
(m :: * -> *) a.
(Member eff sig, Algebra sig m) =>
eff m a -> m a
send forall (m :: * -> *). Fresh m Int
Fresh
{-# INLINE fresh #-}