cleff-0.1.0.0: Fast and concise extensible effects
Safe HaskellNone
LanguageHaskell2010

Cleff.Fail

Synopsis

Effect

data Fail :: Effect where Source #

An effect that expresses failure with a message. This effect allows the use of the MonadFail class.

Constructors

Fail :: String -> Fail m a 

Interpretations

runFail :: Eff (Fail ': es) a -> Eff es (Either String a) Source #

Run a Fail effect in terms of Error.

runFailIO :: IOE :> es => Eff (Fail ': es) ~> Eff es Source #

Run a Fail effect in terms of throwing exceptions in IO.

Orphan instances

Fail :> es => MonadFail (Eff es) Source # 
Instance details

Methods

fail :: String -> Eff es a #