morley-1.20.0: Developer tools for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Michelson.Typed.ClassifiedInstr.Internal.TH

Description

TH code for generating classification boilerplate.

Synopsis

Documentation

promote :: forall a. (Enum a, Lift a) => a -> TypeQ Source #

Convert a Enum constructor to a TemplateHaskell type quote with the corresponding promoted datakind constructor.

generateClassifiedInstr :: DecsQ Source #

Generate ClassifiedInstr from Instr.

classifyInstrTH :: Name -> [Type] -> TypeQ Source #

Based on instruction constructor name and types of its arguments, generate its classification.

generateInstrToWCI :: Name -> DecsQ Source #

Generate the function converting from Instr to WellClassifiedInstr existential.