Safe Haskell | None |
---|---|
Language | Haskell2010 |
High level statements of Indigo language.
Synopsis
- caseRec :: forall dt inp ret clauses. CaseCommon dt ret clauses => Expr dt -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret)
- entryCaseRec :: forall dt entrypointKind inp ret clauses. (CaseCommon dt ret clauses, DocumentEntrypoints entrypointKind dt) => Proxy entrypointKind -> Expr dt -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret)
- entryCaseSimpleRec :: forall cp inp ret clauses. (CaseCommon cp ret clauses, DocumentEntrypoints PlainEntrypointsKind cp, NiceParameterFull cp, RequireFlatParamEps cp) => Expr cp -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret)
- data IndigoCaseClauseL ret (param :: CaseClauseParam)
- type CaseCommonF f dt ret clauses = (InstrCaseC dt, RMap (CaseClauses dt), clauses ~ Rec (f ret) (CaseClauses dt), ScopeCodeGen ret)
- type CaseCommon dt ret clauses = CaseCommonF IndigoCaseClauseL dt 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 inp ret clauses. CaseCommon dt ret clauses => Expr dt -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret) Source #
A case statement for indigo. See examples for a sample usage.
entryCaseRec :: forall dt entrypointKind inp ret clauses. (CaseCommon dt ret clauses, DocumentEntrypoints entrypointKind dt) => Proxy entrypointKind -> Expr dt -> clauses -> IndigoState inp (RetOutStack ret ++ inp) (RetVars ret) Source #
case_
for pattern-matching on parameter.
entryCaseSimpleRec :: forall cp inp ret clauses. (CaseCommon cp ret clauses, DocumentEntrypoints PlainEntrypointsKind cp, NiceParameterFull cp, RequireFlatParamEps cp) => Expr cp -> 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 ret clauses = (InstrCaseC dt, RMap (CaseClauses dt), clauses ~ Rec (f ret) (CaseClauses dt), ScopeCodeGen ret) Source #
type CaseCommon dt ret clauses = CaseCommonF IndigoCaseClauseL dt 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)) # |