effect-monad-0.8.1.0: Embeds effect systems and program logics into Haskell using graded monads and parameterised monads

Safe HaskellNone
LanguageHaskell98

Control.Effect.Cond

Synopsis

Documentation

class Cond (m :: k -> * -> *) where Source #

Provides a conditional using an alternation operation, as opposed to using Subeffect

Minimal complete definition

ifM

Associated Types

type AltInv m (s :: k) (t :: k) :: Constraint Source #

type Alt m (s :: k) (t :: k) :: k Source #

Type family for describing how to combine effects of the two branches of an if

Methods

ifM :: AltInv m s t => Bool -> m s a -> m t a -> m (Alt m s t) a Source #

Conditional on effectful operations

Instances

Cond [*] Reader Source # 

Associated Types

type AltInv Reader (m :: Reader -> * -> *) (s :: Reader) (t :: Reader) :: Constraint Source #

type Alt Reader (m :: Reader -> * -> *) (s :: Reader) (t :: Reader) :: k Source #

Methods

ifM :: AltInv Reader m s t => Bool -> m s a -> m t a -> m (Alt Reader m s t) a Source #

Cond * IMaybe Source # 

Associated Types

type AltInv IMaybe (m :: IMaybe -> * -> *) (s :: IMaybe) (t :: IMaybe) :: Constraint Source #

type Alt IMaybe (m :: IMaybe -> * -> *) (s :: IMaybe) (t :: IMaybe) :: k Source #

Methods

ifM :: AltInv IMaybe m s t => Bool -> m s a -> m t a -> m (Alt IMaybe m s t) a Source #