cleff-0.3.2.0: Fast and concise extensible effects
Copyright(c) 2021 Xy Ren
LicenseBSD3
Maintainerxy.r@outlook.com
Stabilityexperimental
Portabilitynon-portable (GHC only)
Safe HaskellTrustworthy
LanguageHaskell2010

Cleff.Fail

Description

 
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 #