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 MichelsonFailureWithStack 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 MichelsonFailureWithStack 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 MichelsonFailureWithStack 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. Note, that here types of variables are specified, because the result type of arithmetic operations depends on them.
>>>
nop -$ 5
5>>>
sub -$ ((3 :: Integer), (2 :: Integer))
1>>>
push 9 -$ ()
9>>>
add # add -$ ((1 :: Integer), ((2 :: Integer), (3 :: Integer)))
6
(&?-) :: (ZipInstr inps, IsoValue (ZippedStack inps), IsoValue out) => ZippedStack inps -> (inps :-> '[out]) -> Either MichelsonFailureWithStack 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.