Safe Haskell | None |
---|---|
Language | Haskell2010 |
Running Lorentz code easily.
For testing and demonstration purposes.
Synopsis
- (-$?) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out) => (inps :-> '[out]) -> ZippedStack inps -> Either MichelsonFailed out
- (-$) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out, HasCallStack) => (inps :-> '[out]) -> ZippedStack inps -> out
- (&?-) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out) => ZippedStack inps -> (inps :-> '[out]) -> Either MichelsonFailed out
- (&-) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out, HasCallStack) => ZippedStack inps -> (inps :-> '[out]) -> out
- (<-$>) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out, HasCallStack) => (inps :-> '[out]) -> [ZippedStack inps] -> [out]
Documentation
(-$?) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out) => (inps :-> '[out]) -> ZippedStack inps -> Either MichelsonFailed out infixr 2 Source #
Run a lambda with given input.
Note that this always returns one value, but can accept multiple input values (in such case they are grouped into nested pairs).
For testing and demonstration purposes.
(-$) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out, HasCallStack) => (inps :-> '[out]) -> ZippedStack inps -> out infixr 2 Source #
Like
, assumes that no failure is possible.-$?
For testing and demonstration purposes.
>>>
import Lorentz.Instr
>>>
nop -$ 5
5>>>
sub -$ (3, 2)
1>>>
push 9 -$ ()
9>>>
add # add -$ ((1, 2), 3)
6
(&?-) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out) => ZippedStack inps -> (inps :-> '[out]) -> Either MichelsonFailed out infixl 2 Source #
Version of (-$?) with arguments flipped.
(&-) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out, HasCallStack) => ZippedStack inps -> (inps :-> '[out]) -> out infixl 2 Source #
Version of (-$) with arguments flipped.
(<-$>) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out, HasCallStack) => (inps :-> '[out]) -> [ZippedStack inps] -> [out] infixl 2 Source #
Version of (-$) applicable to a series of values.