control-dsl-0.2.0.1: An alternative to monads

Safe HaskellSafe
LanguageHaskell2010

Control.Dsl.Empty

Synopsis

Documentation

data Empty r a where Source #

Constructors

Empty :: Empty r Void 
Instances
Alternative m => PolyCont Empty (m a) Void Source # 
Instance details

Defined in Control.Dsl.Empty

Methods

runPolyCont :: Empty r' Void -> (Void -> m a) -> m a Source #

PolyCont Empty r Void => PolyCont Empty (Cont r a) Void Source # 
Instance details

Defined in Control.Dsl.Cont

Methods

runPolyCont :: Empty r' Void -> (Void -> Cont r a) -> Cont r a Source #

PolyCont Empty r Void => PolyCont Empty (State s r) Void Source # 
Instance details

Defined in Control.Dsl.State.State

Methods

runPolyCont :: Empty r' Void -> (Void -> State s r) -> State s r Source #

empty :: PolyCont Empty a Void => a Source #

Return an empty a, similar to empty.

This empty function aims to be used as the last statement of a do block.