Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Parsing of built-in Michelson macros.
Synopsis
- macro :: Parser (ParsedSeq ParsedOp) -> Parser Macro
- allMacros :: Parser (ParsedSeq ParsedOp) -> Parser Macro
- allSingleTokenMacros :: Parser Macro
- duupMac :: Parser Macro
- diipMac :: Parser [ParsedOp] -> Parser Macro
- pairMac :: Parser Macro
- ifCmpMac :: Parser (ParsedSeq ParsedOp) -> Parser Macro
- mapCadrMac :: Parser (ParsedSeq ParsedOp) -> Parser Macro
- cadrMac :: Parser Macro
- carnMac :: Parser Macro
- cdrnMac :: Parser Macro
Documentation
allMacros :: Parser (ParsedSeq ParsedOp) -> Parser Macro Source #
Includes all macros, also the specially-handled ones. Macros are allowed in more contexts than instructions, so sometimes it's unambiguous.
Notably DUUP
and DIIP
are excluded, as they're always represented by a
single instruction and thus behave more like a primitive.
allSingleTokenMacros :: Parser Macro Source #
This includes all macros consisting of a single token, i.e. also the
specially-handled ones, like PAIIR
, CADR
, etc, but not DUUP
, as it's
always represented as DUPN
and thus behaves like a primitive.