lorentz-0.1.0: EDSL for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Lorentz.Run

Synopsis

Documentation

data CompilationOptions Source #

Constructors

CompilationOptions 

Fields

  • coDisableInitialCast :: Bool

    Flag which defines, whether compiled Michelson contract will have CAST (which drops parameter annotations) as a first instruction. Note, that when flag is false, there still can be no CAST (in case when parameter type has no annotations).

compileLorentz :: (inp :-> out) -> Instr (ToTs inp) (ToTs out) Source #

For use outside of Lorentz.

compileLorentzContract :: forall cp st. (NiceParameterFull cp, NiceStorage st) => Contract cp st -> FullContract (ToT cp) (ToT st) Source #

Version of compileLorentz specialized to instruction corresponding to contract code.

compileLorentzContractWithOptions :: forall cp st. (NiceParameterFull cp, NiceStorage st) => CompilationOptions -> Contract cp st -> FullContract (ToT cp) (ToT st) Source #

Version on compileLorentzContract which accepts CompilationOptions.

Note that compiled contract can be ill-typed in terms of Michelson code when some of the compilation options are used (e.g. when coDoInitialCast is False, resulted contract can be ill-typed). However, compilation with defaultCompilationOptions should be valid.

interpretLorentzInstr :: (IsoValuesStack inp, IsoValuesStack out) => ContractEnv -> (inp :-> out) -> Rec Identity inp -> Either MichelsonFailed (Rec Identity out) Source #

Interpret a Lorentz instruction, for test purposes.

interpretLorentzLambda :: (IsoValue inp, IsoValue out) => ContractEnv -> Lambda inp out -> inp -> Either MichelsonFailed out Source #

Like interpretLorentzInstr, but works on lambda rather than arbitrary instruction.

analyzeLorentz :: (inp :-> out) -> AnalyzerRes Source #

Lorentz version of analyzer.