indigo-0.4: Convenient imperative eDSL over Lorentz.
Safe HaskellNone
LanguageHaskell2010

Indigo.Internal.SIS

Synopsis

Documentation

newtype SomeIndigoState inp Source #

IndigoState with hidden output stack, necessary to generate typed Lorentz code from untyped Indigo frontend.

Constructors

SomeIndigoState 

Fields

data SomeGenCode inp where Source #

GenCode with hidden output stack

Constructors

SomeGenCode :: GenCode inp out -> SomeGenCode inp 

runSIS :: SomeIndigoState inp -> MetaData inp -> (forall out. GenCode inp out -> r) -> r Source #

To run SomeIndigoState you need to pass an handler of GenCode with any output stack and initial MetaData.

thenSIS :: SomeIndigoState inp -> (forall out. SomeIndigoState out) -> SomeIndigoState inp Source #

Similar to a >> for SomeIndigoState.

overSIS :: (forall out. GenCode inp out -> SomeGenCode inp) -> SomeIndigoState inp -> SomeIndigoState inp Source #

Modify the GenCode inside a SomeIndigoState by passing an handler of GenCode that returns a SomeGenCode. Useful in some cases to "wrap" or update and exising SomeGenCode.