Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
PlutusCore.Flat.Decoder.Types
Description
Strict Decoder Types
Synopsis
- newtype Get a = Get {}
- data S = S {}
- data GetResult a = GetResult !S !a
- type Decoded a = Either DecodeException a
- data DecodeException
- = NotEnoughSpace Env
- | TooMuchSpace Env
- | BadEncoding Env String
- | BadOp String
- notEnoughSpace ∷ Ptr Word8 → S → IO a
- tooMuchSpace ∷ Ptr Word8 → S → IO a
- badEncoding ∷ Ptr Word8 → S → String → IO a
- badOp ∷ String → IO a
Documentation
A decoder.
Given:
- end of input buffer
- current position in input buffer
Returns:
- decoded value
- new position in input buffer
type Decoded a = Either DecodeException a Source #
A decoded value
data DecodeException Source #
An exception during decoding
Constructors
NotEnoughSpace Env | |
TooMuchSpace Env | |
BadEncoding Env String | |
BadOp String |
Instances
Exception DecodeException Source # | |
Defined in PlutusCore.Flat.Decoder.Types | |
Show DecodeException Source # | |
Defined in PlutusCore.Flat.Decoder.Types | |
Eq DecodeException Source # | |
Defined in PlutusCore.Flat.Decoder.Types Methods | |
Ord DecodeException Source # | |
Defined in PlutusCore.Flat.Decoder.Types Methods compare ∷ DecodeException → DecodeException → Ordering Source # (<) ∷ DecodeException → DecodeException → Bool Source # (<=) ∷ DecodeException → DecodeException → Bool Source # (>) ∷ DecodeException → DecodeException → Bool Source # (>=) ∷ DecodeException → DecodeException → Bool Source # max ∷ DecodeException → DecodeException → DecodeException Source # min ∷ DecodeException → DecodeException → DecodeException Source # |