morley-1.0.0: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Typed.Doc

Description

Extracting documentation from instructions set.

Synopsis

Documentation

buildInstrDoc :: Instr inp out -> ContractDoc Source #

Assemble contract documentation.

modifyInstrDoc :: DocItem i => (i -> i) -> Instr inp out -> Instr inp out Source #

Recursevly traverse an instruction and modify documentation items matching given type.

cutInstrNonDoc :: (forall i o. Instr i o -> Instr i o) -> Instr inp out -> Instr s s Source #

Leave only instructions related to documentation.

Generated documentation for resulting instruction remains the same, but semantics of instruction itself gets lost. We have to pass optimizer here as an argument to avoid cyclic dependencies.