Safe Haskell | None |
---|---|
Language | Haskell2010 |
High level statements of Indigo language.
Synopsis
- caseRec :: forall dt guard inp ret clauses. CaseCommon dt guard ret clauses => guard -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret)
- entryCaseRec :: forall dt entrypointKind guard inp ret clauses. (CaseCommon dt guard ret clauses, DocumentEntrypoints entrypointKind dt) => Proxy entrypointKind -> guard -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret)
- entryCaseSimpleRec :: forall cp guard inp ret clauses. (CaseCommon cp guard ret clauses, DocumentEntrypoints PlainEntrypointsKind cp, NiceParameterFull cp, RequireFlatParamEps cp) => guard -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret)
- data IndigoCaseClauseL ret (param :: CaseClauseParam)
- type CaseCommonF f dt guard ret clauses = (guard :~> dt, InstrCaseC dt, RMap (CaseClauses dt), clauses ~ Rec (f ret) (CaseClauses dt), ScopeCodeGen ret)
- type CaseCommon dt guard ret clauses = CaseCommonF IndigoCaseClauseL dt guard ret clauses
- data IndigoAnyOut x ret = forall retBranch.(ScopeCodeGen retBranch, RetOutStack ret ~ RetOutStack retBranch) => IndigoAnyOut (forall inp. SomeIndigoState (x ': inp) retBranch)
Documentation
caseRec :: forall dt guard inp ret clauses. CaseCommon dt guard ret clauses => guard -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret) Source #
A case statement for indigo. See examples for a sample usage.
entryCaseRec :: forall dt entrypointKind guard inp ret clauses. (CaseCommon dt guard ret clauses, DocumentEntrypoints entrypointKind dt) => Proxy entrypointKind -> guard -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret) Source #
case_
for pattern-matching on parameter.
entryCaseSimpleRec :: forall cp guard inp ret clauses. (CaseCommon cp guard ret clauses, DocumentEntrypoints PlainEntrypointsKind cp, NiceParameterFull cp, RequireFlatParamEps cp) => guard -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret) Source #
entryCase_
for contracts with flat parameter.
data IndigoCaseClauseL ret (param :: CaseClauseParam) Source #
This type is analogous to the CaseClauseL
type but instead of wrapping a Lorentz
instruction, this wraps an Indigo value with the same input/output types.
Instances
(name ~ AppendSymbol "c" ctor, KnownValue x) => CaseArrow name (Var x -> IndigoAnyOut x ret) (IndigoCaseClauseL ret ('CaseClauseParam ctor ('OneField x))) Source # | |
Defined in Indigo.Backend.Case (/->) :: Label name -> (Var x -> IndigoAnyOut x ret) -> IndigoCaseClauseL ret ('CaseClauseParam ctor ('OneField x)) # |
type CaseCommonF f dt guard ret clauses = (guard :~> dt, InstrCaseC dt, RMap (CaseClauses dt), clauses ~ Rec (f ret) (CaseClauses dt), ScopeCodeGen ret) Source #
type CaseCommon dt guard ret clauses = CaseCommonF IndigoCaseClauseL dt guard ret clauses Source #
data IndigoAnyOut x ret Source #
forall retBranch.(ScopeCodeGen retBranch, RetOutStack ret ~ RetOutStack retBranch) => IndigoAnyOut (forall inp. SomeIndigoState (x ': inp) retBranch) |
Instances
(name ~ AppendSymbol "c" ctor, KnownValue x) => CaseArrow name (Var x -> IndigoAnyOut x ret) (IndigoCaseClauseL ret ('CaseClauseParam ctor ('OneField x))) Source # | |
Defined in Indigo.Backend.Case (/->) :: Label name -> (Var x -> IndigoAnyOut x ret) -> IndigoCaseClauseL ret ('CaseClauseParam ctor ('OneField x)) # |