Safe Haskell | None |
---|---|
Language | Haskell2010 |
Standard library for Indigo.
As opposed to Expr and Language modules, this module contains quite standard things that are not present in vanilla Michelson and are not typically found in imperative high level languages.
Synopsis
- view_ :: forall arg r viewExpr exr. (KnownValue arg, NiceParameter r, viewExpr :~> View arg r, exr :~> r, HasSideEffects) => (Expr arg -> IndigoM exr) -> viewExpr -> IndigoM ()
- void_ :: forall a b voidExpr exb. (KnownValue a, IsError (VoidResult b), NiceConstant b, voidExpr :~> Void_ a b, exb :~> b) => (Expr a -> IndigoM exb) -> voidExpr -> IndigoM ()
- project :: forall arg r viewExpr exr. (KnownValue arg, NiceParameter r, viewExpr :~> View arg r, exr :~> r, HasSideEffects) => viewExpr -> (Expr arg -> IndigoM exr) -> IndigoM ()
- projectVoid :: forall a b voidExpr exb. (KnownValue a, IsError (VoidResult b), NiceConstant b, voidExpr :~> Void_ a b, exb :~> b) => voidExpr -> (Expr a -> IndigoM exb) -> IndigoM ()
- subGt0 :: (ex1 :~> Natural, ex2 :~> Natural) => ex1 -> ex2 -> IndigoM () -> IndigoFunction (Maybe Natural)
Views and Voids
view_ :: forall arg r viewExpr exr. (KnownValue arg, NiceParameter r, viewExpr :~> View arg r, exr :~> r, HasSideEffects) => (Expr arg -> IndigoM exr) -> viewExpr -> IndigoM () Source #
Indigo version of the view
macro. It takes a function from view
argument to view result and a View
structure that typically comes
from a top-level case
.
void_ :: forall a b voidExpr exb. (KnownValue a, IsError (VoidResult b), NiceConstant b, voidExpr :~> Void_ a b, exb :~> b) => (Expr a -> IndigoM exb) -> voidExpr -> IndigoM () Source #
Indigo version of the void
macro.
project :: forall arg r viewExpr exr. (KnownValue arg, NiceParameter r, viewExpr :~> View arg r, exr :~> r, HasSideEffects) => viewExpr -> (Expr arg -> IndigoM exr) -> IndigoM () Source #
projectVoid :: forall a b voidExpr exb. (KnownValue a, IsError (VoidResult b), NiceConstant b, voidExpr :~> Void_ a b, exb :~> b) => voidExpr -> (Expr a -> IndigoM exb) -> IndigoM () Source #
Flipped version of void_
that is present due to the common
appearance of flip void_ parameter $ instr
construction.