| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusCore.Parser.Builtin
Synopsis
- cachedBuiltin ∷ Map Text DefaultFun
- constant ∷ Parser (Some (ValueOf DefaultUni))
- data ExpectParens
- builtinFunction ∷ Parser DefaultFun
- conInteger ∷ Parser Integer
- hexByte ∷ Parser Word8
- conBS ∷ Parser ByteString
- conText ∷ Parser Text
- conUnit ∷ Parser ()
- conBool ∷ Parser Bool
- conList ∷ DefaultUni (Esc a) → Parser [a]
- conArray ∷ DefaultUni (Esc a) → Parser (Vector a)
- conPair ∷ DefaultUni (Esc a) → DefaultUni (Esc b) → Parser (a, b)
- conDataNoParens ∷ Parser Data
- conData ∷ ExpectParens → Parser Data
- con0xBS ∷ Parser ByteString
- conBLS12_381_G1_Element ∷ Parser Element
- conBLS12_381_G2_Element ∷ Parser Element
- constantOf ∷ ExpectParens → DefaultUni (Esc a) → Parser a
- conValue ∷ Parser Value
Documentation
constant ∷ Parser (Some (ValueOf DefaultUni)) Source #
Parser of constants whose type is in DefaultUni.
data ExpectParens Source #
Constructors
| ExpectParensYes | |
| ExpectParensNo |
builtinFunction ∷ Parser DefaultFun Source #
Parser for builtin functions. Atm the parser can only parse DefaultFun.
conInteger ∷ Parser Integer Source #
Parser for integer constants.
conBS ∷ Parser ByteString Source #
Parser for bytestring constants. They start with "#".
conText ∷ Parser 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.
conPair ∷ DefaultUni (Esc a) → DefaultUni (Esc b) → Parser (a, b) Source #
Parser for pairs.
constantOf ∷ ExpectParens → DefaultUni (Esc a) → Parser a Source #
Parser for constants of the given type.
conValue ∷ Parser 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.