morley-0.2.0.1: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Interpret

Description

Module, containing function to interpret Michelson instructions against given context and input stack.

Synopsis

Documentation

data ContractEnv Source #

Environment for contract execution.

Constructors

ContractEnv 

Fields

data MichelsonFailed where Source #

Represents `[FAILED]` state of a Michelson program. Contains value that was on top of the stack when FAILWITH was called.

data SomeItStack where Source #

Constructors

SomeItStack :: Typeable inp => Rec (Val Instr) inp -> SomeItStack 

interpretUntyped :: forall s. (ExtC, ToJSON ExpandedInstrExtU) => TcExtHandler -> UntypedContract -> UntypedValue -> UntypedValue -> InterpreterEnv s -> s -> Either (InterpretUntypedError s) (InterpretUntypedResult s) Source #

Interpret a contract without performing any side effects.

data InterpretUntypedError s Source #

Instances
(Buildable ExpandedInstr, Show s) => Show (InterpretUntypedError s) Source # 
Instance details

Defined in Michelson.Interpret

Generic (InterpretUntypedError s) Source # 
Instance details

Defined in Michelson.Interpret

Associated Types

type Rep (InterpretUntypedError s) :: Type -> Type #

(ConversibleExt, Buildable s) => Buildable (InterpretUntypedError s) Source # 
Instance details

Defined in Michelson.Interpret

type Rep (InterpretUntypedError s) Source # 
Instance details

Defined in Michelson.Interpret

runInstr :: (ExtC, ToJSON ExpandedInstrExtU, Typeable inp) => Instr inp out -> Rec (Val Instr) inp -> EvalOp state (Rec (Val Instr) out) Source #

Function to change amount of remaining steps stored in State monad

runInstrNoGas :: forall a b state. (ExtC, ToJSON ExpandedInstrExtU, Typeable a) => Instr a b -> Rec (Val Instr) a -> EvalOp state (Rec (Val Instr) b) Source #