-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A Haskell implementation of MessagePack.
--
-- A Haskell implementation of MessagePack http://msgpack.org/
--
-- This is a fork of msgpack-haskell
-- https://github.com/msgpack/msgpack-haskell, since the original
-- author is unreachable. This fork incorporates a number of bugfixes and
-- is actively being developed.
@package msgpack-types
@version 0.2.1
module Data.MessagePack.Types
newtype Assoc a
Assoc :: a -> Assoc a
[unAssoc] :: Assoc a -> a
-- | Object Representation of MessagePack data.
data Object
-- | represents nil
ObjectNil :: Object
-- | represents true or false
ObjectBool :: Bool -> Object
-- | represents a negative integer
ObjectInt :: {-# UNPACK #-}Int64 -> Object
-- | represents a positive integer
ObjectWord :: {-# UNPACK #-}Word64 -> Object
-- | represents a floating point number
ObjectFloat :: {-# UNPACK #-}Float -> Object
-- | represents a floating point number
ObjectDouble :: {-# UNPACK #-}Double -> Object
-- | extending Raw type represents a UTF-8 string
ObjectStr :: Text -> Object
-- | extending Raw type represents a byte array
ObjectBin :: ByteString -> Object
-- | represents a sequence of objects
ObjectArray :: [Object] -> Object
-- | represents key-value pairs of objects
ObjectMap :: [(Object, Object)] -> Object
-- | represents a tuple of an integer and a byte array where the integer
-- represents type information and the byte array represents data.
ObjectExt :: {-# UNPACK #-}Word8 -> ByteString -> Object
class MessagePack a
toObject :: MessagePack a => Config -> a -> Object
fromObjectWith :: (MessagePack a, Applicative m, Monad m, MonadValidate DecodeError m) => Config -> Object -> m a
toObject :: (MessagePack a, Generic a, GMessagePack (Rep a)) => Config -> a -> Object
fromObjectWith :: (MessagePack a, Applicative m, Monad m, MonadValidate DecodeError m, Generic a, GMessagePack (Rep a)) => Config -> Object -> m a
data Config
defaultConfig :: Config
data DecodeError
decodeError :: String -> DecodeError
errorMessages :: DecodeError -> [String]
-- | Similar to fromObjectWith defaultConfig but returns the
-- result in a MonadFail.
--
-- Useful when running in another MonadFail like Maybe.
fromObject :: (MonadFail m, MessagePack a) => Object -> m a