Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
parseValue :: ParserValueRole -> Parser Value Source #
Parse a Value
from its string representation. The role
argument for which purpose
the value is being parsed. This is used to enforce additional constraints on the value.
Why do we parse a general value and check for additional constraints you may ask?
Because we can't rule out the negation operator
for transaction outputs: some users have negative values in additions, with the addition's total
summing up to a positive value. So forbidding negations altogether is too restrictive.
parseAssetName :: Parser AssetName Source #
Asset name parser.
parsePolicyId :: Parser PolicyId Source #
Policy ID parser.
data ParserValueRole Source #
The role for which a Value
is being parsed.
RoleUTxO | The value is used as a UTxO or transaction output. |
RoleMint | The value is used as a minting policy. |
Instances
Bounded ParserValueRole Source # | |
Defined in Cardano.Api.ValueParser | |
Enum ParserValueRole Source # | |
Defined in Cardano.Api.ValueParser succ :: ParserValueRole -> ParserValueRole Source # pred :: ParserValueRole -> ParserValueRole Source # toEnum :: Int -> ParserValueRole Source # fromEnum :: ParserValueRole -> Int Source # enumFrom :: ParserValueRole -> [ParserValueRole] Source # enumFromThen :: ParserValueRole -> ParserValueRole -> [ParserValueRole] Source # enumFromTo :: ParserValueRole -> ParserValueRole -> [ParserValueRole] Source # enumFromThenTo :: ParserValueRole -> ParserValueRole -> ParserValueRole -> [ParserValueRole] Source # | |
Show ParserValueRole Source # | |
Defined in Cardano.Api.ValueParser | |
Eq ParserValueRole Source # | |
Defined in Cardano.Api.ValueParser (==) :: ParserValueRole -> ParserValueRole -> Bool Source # (/=) :: ParserValueRole -> ParserValueRole -> Bool Source # |