-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Bencodex reader/writer for Haskell
--
-- Please see the README on GitHub at
-- https://github.com/dahlia/bencodex-haskell#readme.
@package bencodex
@version 1.0.0
module Data.Bencodex.Types
data BKey
BTextKey :: Text -> BKey
BByteStringKey :: ByteString -> BKey
data BValue
BNull :: BValue
BBool :: Bool -> BValue
BInteger :: Integer -> BValue
BByteString :: ByteString -> BValue
BText :: Text -> BValue
BList :: [BValue] -> BValue
BMap :: HashMap BKey BValue -> BValue
instance GHC.Show.Show Data.Bencodex.Types.BValue
instance GHC.Classes.Ord Data.Bencodex.Types.BValue
instance GHC.Classes.Eq Data.Bencodex.Types.BValue
instance GHC.Show.Show Data.Bencodex.Types.BKey
instance GHC.Classes.Ord Data.Bencodex.Types.BKey
instance GHC.Generics.Generic Data.Bencodex.Types.BKey
instance GHC.Classes.Eq Data.Bencodex.Types.BKey
instance Data.Hashable.Class.Hashable Data.Bencodex.Types.BKey
module Data.Bencodex.Reader
-- | The result of a parse.
data Result r
-- | The parse failed. The ByteString is the input that had not yet
-- been consumed when the failure occurred. The
-- [String] is a list of contexts in which the
-- error occurred. The String is the message describing the error,
-- if any.
Fail :: ByteString -> [String] -> String -> Result r
-- | The parse succeeded. The ByteString is the input that had not
-- yet been consumed (if any) when the parse succeeded.
Done :: ByteString -> r -> Result r
bValue :: Parser BValue
byteString :: Parser ByteString
decodeLazy :: ByteString -> Result BValue
decodeStrict :: ByteString -> Either String BValue
false :: Parser Bool
integer :: Parser Integer
list :: Parser [BValue]
map' :: Parser (HashMap BKey BValue)
null' :: Parser ()
text :: Parser Text
true :: Parser Bool
module Data.Bencodex.Writer
encodeLazy :: BValue -> ByteString
encodeStrict :: BValue -> ByteString
instance GHC.Show.Show Data.Bencodex.Writer.KeyType
instance GHC.Classes.Ord Data.Bencodex.Writer.KeyType
instance GHC.Classes.Eq Data.Bencodex.Writer.KeyType
module Data.Bencodex
data BKey
BTextKey :: Text -> BKey
BByteStringKey :: ByteString -> BKey
data BValue
BNull :: BValue
BBool :: Bool -> BValue
BInteger :: Integer -> BValue
BByteString :: ByteString -> BValue
BText :: Text -> BValue
BList :: [BValue] -> BValue
BMap :: HashMap BKey BValue -> BValue
-- | The result of a parse.
data Result r
-- | The parse failed. The ByteString is the input that had not yet
-- been consumed when the failure occurred. The
-- [String] is a list of contexts in which the
-- error occurred. The String is the message describing the error,
-- if any.
Fail :: ByteString -> [String] -> String -> Result r
-- | The parse succeeded. The ByteString is the input that had not
-- yet been consumed (if any) when the parse succeeded.
Done :: ByteString -> r -> Result r
decodeLazy :: ByteString -> Result BValue
decodeStrict :: ByteString -> Either String BValue
encodeLazy :: BValue -> ByteString
encodeStrict :: BValue -> ByteString