plutus-core-1.65.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Parser.Builtin

Synopsis

Documentation

constantParser (Some (ValueOf DefaultUni)) Source #

Parser of constants whose type is in DefaultUni.

builtinFunctionParser DefaultFun Source #

Parser for builtin functions. Atm the parser can only parse DefaultFun.

conIntegerParser Integer Source #

Parser for integer constants.

hexByteParser Word8 Source #

Parser for a pair of hex digits to a Word8.

conBSParser ByteString Source #

Parser for bytestring constants. They start with "#".

conTextParser Text Source #

Parser for string constants (wrapped in double quotes). Note that Data.Text.pack "performs replacement on invalid scalar values", which means that Unicode surrogate code points (corresponding to integers in the range 0xD800-0xDFFF) are converted to the Unicode replacement character U+FFFD (decimal 65533). Thus `(con string "XxD800Z")` parses to a Text object whose second character is U+FFFD.

conUnitParser () Source #

Parser for unit.

conBoolParser Bool Source #

Parser for bool.

conListDefaultUni (Esc a) → Parser [a] Source #

Parser for lists.

conArrayDefaultUni (Esc a) → Parser (Vector a) Source #

Parser for arrays.

conPairDefaultUni (Esc a) → DefaultUni (Esc b) → Parser (a, b) Source #

Parser for pairs.

constantOfExpectParensDefaultUni (Esc a) → Parser a Source #

Parser for constants of the given type.

conValueParser Value Source #

Parser for values. This fails if the value isn't in canonical form, ie if there are any zero or out-of-bounds quantities or if any currency or token IDs are too big or if the currency IDs or the token IDs for each currency aren't in strictly ascending order. To get accurate error positions we check the bounds in the parser, but the ordering check is deferred to Value.buildValueWith.