ivory-0.1.0.8: Safe embedded C programming.

Safe HaskellSafe
LanguageHaskell2010

Ivory.Language.Effects

Synopsis

Documentation

data Effects Source #

The effect context for Ivory operations.

data ReturnEff Source #

Function return effect.

Constructors

Returns t 
NoReturn 

type family GetReturn (effs :: Effects) :: ReturnEff Source #

Retrieve any Return effect present.

Instances
type GetReturn (Effects r b a) Source # 
Instance details

Defined in Ivory.Language.Effects

type GetReturn (Effects r b a) = r

type family ClearReturn (effs :: Effects) :: Effects Source #

Remove any Return effects present.

Instances
type ClearReturn (Effects r b a) Source # 
Instance details

Defined in Ivory.Language.Effects

type ClearReturn (Effects r b a) = Effects NoReturn b a

data BreakEff Source #

Loop break effect.

Constructors

Break 
NoBreak 

type family GetBreaks (effs :: Effects) :: BreakEff Source #

Retrieve any Breaks effect present.

Instances
type GetBreaks (Effects r b a) Source # 
Instance details

Defined in Ivory.Language.Effects

type GetBreaks (Effects r b a) = b

type family AllowBreak (effs :: Effects) :: Effects Source #

Add the Break effect into an effect context.

Instances
type AllowBreak (Effects r b a) Source # 
Instance details

Defined in Ivory.Language.Effects

type AllowBreak (Effects r b a) = Effects r Break a

type family ClearBreak (effs :: Effects) :: Effects Source #

Remove any Break effect present.

Instances
type ClearBreak (Effects r b a) Source # 
Instance details

Defined in Ivory.Language.Effects

type ClearBreak (Effects r b a) = Effects r NoBreak a

data AllocEff Source #

Stack allocation effect.

Constructors

Scope s 
NoAlloc 

type family GetAlloc (effs :: Effects) :: AllocEff Source #

Retrieve the current allocation effect.

Instances
type GetAlloc (Effects r b a) Source # 
Instance details

Defined in Ivory.Language.Effects

type GetAlloc (Effects r b a) = a

type family ClearAlloc (effs :: Effects) :: Effects Source #

Remove any allocation effect currently present.

Instances
type ClearAlloc (Effects r b a) Source # 
Instance details

Defined in Ivory.Language.Effects

type ClearAlloc (Effects r b a) = Effects r b NoAlloc