Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data CadrStruct
- data PairStruct
- data UnpairStruct
- = UF (VarAnn, FieldAnn)
- | UP UnpairStruct UnpairStruct
- data Macro
- = CASE (NonEmpty [ParsedOp])
- | TAG Natural (NonEmpty Type)
- | ACCESS Natural Positive
- | SET Natural Positive
- | CONSTRUCT (NonEmpty [ParsedOp])
- | VIEW [ParsedOp]
- | VOID [ParsedOp]
- | CMP ParsedInstr VarAnn
- | IFX ParsedInstr [ParsedOp] [ParsedOp]
- | IFCMP ParsedInstr VarAnn [ParsedOp] [ParsedOp]
- | FAIL
- | PAPAIR PairStruct TypeAnn VarAnn
- | UNPAIR UnpairStruct
- | CADR [CadrStruct] VarAnn FieldAnn
- | SET_CADR [CadrStruct] VarAnn FieldAnn
- | MAP_CADR [CadrStruct] VarAnn FieldAnn [ParsedOp]
- | DIIP Word [ParsedOp]
- | DUUP Word VarAnn
- | ASSERT
- | ASSERTX ParsedInstr
- | ASSERT_CMP ParsedInstr
- | ASSERT_NONE
- | ASSERT_SOME
- | ASSERT_LEFT
- | ASSERT_RIGHT
- | IF_SOME [ParsedOp] [ParsedOp]
- | IF_RIGHT [ParsedOp] [ParsedOp]
- data LetMacro = LetMacro {}
- type ParsedValue = Value' ParsedOp
- type ParsedInstr = InstrAbstract ParsedOp
- data ParsedOp
- type ParsedUExtInstr = ExtInstrAbstract ParsedOp
- expandContract :: Contract' ParsedOp -> Contract
- expandValue :: ParsedValue -> Value
- mapPairLeaves :: [FieldAnn] -> PairStruct -> PairStruct
- mapUnpairLeaves :: [(VarAnn, FieldAnn)] -> UnpairStruct -> UnpairStruct
- expand :: LetCallStack -> ParsedOp -> ExpandedOp
- expandList :: [ParsedOp] -> [ExpandedOp]
- expandMacro :: InstrCallStack -> Macro -> [ExpandedOp]
- expandPapair :: InstrCallStack -> PairStruct -> TypeAnn -> VarAnn -> [ExpandedOp]
- expandUnpapair :: InstrCallStack -> UnpairStruct -> [ExpandedOp]
- expandCadr :: InstrCallStack -> [CadrStruct] -> VarAnn -> FieldAnn -> [ExpandedOp]
- expandSetCadr :: InstrCallStack -> [CadrStruct] -> VarAnn -> FieldAnn -> [ExpandedOp]
- expandMapCadr :: InstrCallStack -> [CadrStruct] -> VarAnn -> FieldAnn -> [ParsedOp] -> [ExpandedOp]
Macros types
data CadrStruct Source #
Instances
data PairStruct Source #
Instances
data UnpairStruct Source #
Instances
Built-in Michelson Macros defined by the specification
Instances
A programmer-defined macro
Instances
Eq LetMacro Source # | |
Data LetMacro Source # | |
Defined in Michelson.Macro gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LetMacro -> c LetMacro # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LetMacro # toConstr :: LetMacro -> Constr # dataTypeOf :: LetMacro -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LetMacro) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LetMacro) # gmapT :: (forall b. Data b => b -> b) -> LetMacro -> LetMacro # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LetMacro -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LetMacro -> r # gmapQ :: (forall d. Data d => d -> u) -> LetMacro -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LetMacro -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LetMacro -> m LetMacro # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LetMacro -> m LetMacro # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LetMacro -> m LetMacro # | |
Show LetMacro Source # | |
Generic LetMacro Source # | |
ToJSON LetMacro Source # | |
Defined in Michelson.Macro | |
FromJSON LetMacro Source # | |
NFData LetMacro Source # | |
Defined in Michelson.Macro | |
Buildable LetMacro Source # | |
Defined in Michelson.Macro | |
type Rep LetMacro Source # | |
Defined in Michelson.Macro type Rep LetMacro = D1 ('MetaData "LetMacro" "Michelson.Macro" "morley-1.7.0-inplace" 'False) (C1 ('MetaCons "LetMacro" 'PrefixI 'True) (S1 ('MetaSel ('Just "lmName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "lmSig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 StackFn) :*: S1 ('MetaSel ('Just "lmExpr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [ParsedOp])))) |
Morley Parsed value types
type ParsedValue = Value' ParsedOp Source #
Morley Parsed instruction types
type ParsedInstr = InstrAbstract ParsedOp Source #
Unexpanded instructions produced directly by the ops
parser, which
contains primitive Michelson Instructions, inline-able macros and sequences
Prim ParsedInstr SrcPos | Primitive Michelson instruction |
Mac Macro SrcPos | Built-in Michelson macro defined by the specification |
LMac LetMacro SrcPos | User-defined macro with instructions to be inlined |
Seq [ParsedOp] SrcPos | A sequence of instructions |
Instances
For utilities
expandValue :: ParsedValue -> Value Source #
For parsing
mapPairLeaves :: [FieldAnn] -> PairStruct -> PairStruct Source #
mapUnpairLeaves :: [(VarAnn, FieldAnn)] -> UnpairStruct -> UnpairStruct Source #
Internals exported for tests
expand :: LetCallStack -> ParsedOp -> ExpandedOp Source #
expandList :: [ParsedOp] -> [ExpandedOp] Source #
expandMacro :: InstrCallStack -> Macro -> [ExpandedOp] Source #
expandPapair :: InstrCallStack -> PairStruct -> TypeAnn -> VarAnn -> [ExpandedOp] Source #
expandUnpapair :: InstrCallStack -> UnpairStruct -> [ExpandedOp] Source #
expandCadr :: InstrCallStack -> [CadrStruct] -> VarAnn -> FieldAnn -> [ExpandedOp] Source #
expandSetCadr :: InstrCallStack -> [CadrStruct] -> VarAnn -> FieldAnn -> [ExpandedOp] Source #
expandMapCadr :: InstrCallStack -> [CadrStruct] -> VarAnn -> FieldAnn -> [ParsedOp] -> [ExpandedOp] Source #