in-other-words-0.1.1.0: A higher-order effect system where the sky's the limit
Safe HaskellNone
LanguageHaskell2010

Control.Effect.Internal.Optional

Synopsis

Documentation

newtype HoistOptionCall b a Source #

Constructors

HoistOptionCall (forall x. (a -> x) -> b x -> b x) 

Instances

Instances details
Carrier m => PrimHandler HoistOptionH (HoistOption m) m Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Functor (HoistOptionCall b) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

fmap :: (a -> b0) -> HoistOptionCall b a -> HoistOptionCall b b0 #

(<$) :: a -> HoistOptionCall b b0 -> HoistOptionCall b a #

type HoistOption (b :: * -> *) = Optional (HoistOptionCall b) Source #

A useful specialization of Optional where the functor is HoistOptionCall b. From this, you can derive hoistOption.

data HoistOptionH Source #

Instances

Instances details
Carrier m => PrimHandler HoistOptionH (HoistOption m) m Source # 
Instance details

Defined in Control.Effect.Internal.Optional

newtype HoistOptionC m a Source #

Constructors

HoistOptionC 

Fields

Instances

Instances details
MonadTrans (HoistOptionC :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

lift :: Monad m => m a -> HoistOptionC m a #

MonadTransControl (HoistOptionC :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Associated Types

type StT HoistOptionC a #

Methods

liftWith :: Monad m => (Run HoistOptionC -> m a) -> HoistOptionC m a #

restoreT :: Monad m => m (StT HoistOptionC a) -> HoistOptionC m a #

Monad m => Monad (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

(>>=) :: HoistOptionC m a -> (a -> HoistOptionC m b) -> HoistOptionC m b #

(>>) :: HoistOptionC m a -> HoistOptionC m b -> HoistOptionC m b #

return :: a -> HoistOptionC m a #

Functor m => Functor (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

fmap :: (a -> b) -> HoistOptionC m a -> HoistOptionC m b #

(<$) :: a -> HoistOptionC m b -> HoistOptionC m a #

MonadFix m => MonadFix (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

mfix :: (a -> HoistOptionC m a) -> HoistOptionC m a #

MonadFail m => MonadFail (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

fail :: String -> HoistOptionC m a #

Applicative m => Applicative (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

pure :: a -> HoistOptionC m a #

(<*>) :: HoistOptionC m (a -> b) -> HoistOptionC m a -> HoistOptionC m b #

liftA2 :: (a -> b -> c) -> HoistOptionC m a -> HoistOptionC m b -> HoistOptionC m c #

(*>) :: HoistOptionC m a -> HoistOptionC m b -> HoistOptionC m b #

(<*) :: HoistOptionC m a -> HoistOptionC m b -> HoistOptionC m a #

MonadIO m => MonadIO (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

liftIO :: IO a -> HoistOptionC m a #

Alternative m => Alternative (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

empty :: HoistOptionC m a #

(<|>) :: HoistOptionC m a -> HoistOptionC m a -> HoistOptionC m a #

some :: HoistOptionC m a -> HoistOptionC m [a] #

many :: HoistOptionC m a -> HoistOptionC m [a] #

MonadPlus m => MonadPlus (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

mzero :: HoistOptionC m a #

mplus :: HoistOptionC m a -> HoistOptionC m a -> HoistOptionC m a #

MonadThrow m => MonadThrow (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

throwM :: Exception e => e -> HoistOptionC m a #

MonadCatch m => MonadCatch (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

catch :: Exception e => HoistOptionC m a -> (e -> HoistOptionC m a) -> HoistOptionC m a #

MonadMask m => MonadMask (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Methods

mask :: ((forall a. HoistOptionC m a -> HoistOptionC m a) -> HoistOptionC m b) -> HoistOptionC m b #

uninterruptibleMask :: ((forall a. HoistOptionC m a -> HoistOptionC m a) -> HoistOptionC m b) -> HoistOptionC m b #

generalBracket :: HoistOptionC m a -> (a -> ExitCase b -> HoistOptionC m c) -> (a -> HoistOptionC m b) -> HoistOptionC m (b, c) #

Carrier m => Carrier (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

Associated Types

type Derivs (HoistOptionC m) :: [Effect] Source #

type Prims (HoistOptionC m) :: [Effect] Source #

type StT (HoistOptionC :: (Type -> Type) -> Type -> Type) a Source # 
Instance details

Defined in Control.Effect.Internal.Optional

type StT (HoistOptionC :: (Type -> Type) -> Type -> Type) a = StT (IdentityT :: (Type -> Type) -> Type -> Type) a
type Derivs (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional

type Prims (HoistOptionC m) Source # 
Instance details

Defined in Control.Effect.Internal.Optional