Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data BKey
- data BValue
- data Result r
- = Fail ByteString [String] String
- | Done ByteString r
- decodeLazy :: ByteString -> Result BValue
- decodeStrict :: ByteString -> Either String BValue
- encodeLazy :: BValue -> ByteString
- encodeStrict :: BValue -> ByteString
Documentation
Instances
Eq BKey Source # | |
Ord BKey Source # | |
Show BKey Source # | |
Generic BKey Source # | |
Hashable BKey Source # | |
Defined in Data.Bencodex.Types | |
type Rep BKey Source # | |
Defined in Data.Bencodex.Types type Rep BKey = D1 (MetaData "BKey" "Data.Bencodex.Types" "bencodex-1.0.0-9Q8hzVsJ9RM8uxfYl3oMVJ" False) (C1 (MetaCons "BTextKey" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) :+: C1 (MetaCons "BByteStringKey" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ByteString))) |
BNull | |
BBool Bool | |
BInteger Integer | |
BByteString ByteString | |
BText Text | |
BList [BValue] | |
BMap (HashMap BKey BValue) |
The result of a parse.
Fail ByteString [String] String | The parse failed. The |
Done ByteString r | The parse succeeded. The |
decodeLazy :: ByteString -> Result BValue Source #
decodeStrict :: ByteString -> Either String BValue Source #
encodeLazy :: BValue -> ByteString Source #
encodeStrict :: BValue -> ByteString Source #