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

Indigo.Compilation.Params

Synopsis

Documentation

type IndigoWithParams n inp a = IndigoWithPeanoParams (ToPeano n) inp a Source #

Type of a function with n Var arguments and IndigoM a result.

Note that the arguments are the first n elements of the inp stack in inverse order, for example: IndigoWithParams 2 [a, b, c] x is the same as: Var b -> Var a -> IndigoM x

type AreIndigoParams n stk = (AreIndigoPeanoParams (ToPeano n) stk, SingI (ToPeano n)) Source #

Typeable and stack size constraints for the parameters of an IndigoWithParams and for converting to a Peano

fromIndigoWithParams :: forall n a inp. (AreIndigoParams n inp, KnownValue a, Default (StackVars inp)) => IndigoWithParams n inp a -> (IndigoM a, StackVars inp, RefId) Source #

Converts an IndigoWithParams to its form without input Vars, alongside the StackVars to use it with and the first available (unassingned) RefId.

contractToIndigoWithParams :: forall param st. KnownValue st => IndigoContract param st -> IndigoWithParams 3 '[param, st, Ops] () Source #

Converts an IndigoContract to the equivalent IndigoM with the storage, parameter and ops list as arguments.