{-# 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 :: m Int
fresh = Fresh m Int -> m Int
forall (eff :: (* -> *) -> * -> *) (sig :: (* -> *) -> * -> *)
(m :: * -> *) a.
(Member eff sig, Algebra sig m) =>
eff m a -> m a
send Fresh m Int
forall (m :: * -> *). Fresh m Int
Fresh
{-# INLINE fresh #-}