msgpack-types-0.0.4: A Haskell implementation of MessagePack.

Safe HaskellSafe
LanguageHaskell2010

Data.MessagePack.Types

Synopsis

Documentation

newtype Assoc a Source #

Constructors

Assoc 

Fields

Instances
Eq a => Eq (Assoc a) Source # 
Instance details

Defined in Data.MessagePack.Types.Assoc

Methods

(==) :: Assoc a -> Assoc a -> Bool #

(/=) :: Assoc a -> Assoc a -> Bool #

Ord a => Ord (Assoc a) Source # 
Instance details

Defined in Data.MessagePack.Types.Assoc

Methods

compare :: Assoc a -> Assoc a -> Ordering #

(<) :: Assoc a -> Assoc a -> Bool #

(<=) :: Assoc a -> Assoc a -> Bool #

(>) :: Assoc a -> Assoc a -> Bool #

(>=) :: Assoc a -> Assoc a -> Bool #

max :: Assoc a -> Assoc a -> Assoc a #

min :: Assoc a -> Assoc a -> Assoc a #

Read a => Read (Assoc a) Source # 
Instance details

Defined in Data.MessagePack.Types.Assoc

Show a => Show (Assoc a) Source # 
Instance details

Defined in Data.MessagePack.Types.Assoc

Methods

showsPrec :: Int -> Assoc a -> ShowS #

show :: Assoc a -> String #

showList :: [Assoc a] -> ShowS #

Arbitrary a => Arbitrary (Assoc a) Source # 
Instance details

Defined in Data.MessagePack.Types.Assoc

Methods

arbitrary :: Gen (Assoc a) #

shrink :: Assoc a -> [Assoc a] #

NFData a => NFData (Assoc a) Source # 
Instance details

Defined in Data.MessagePack.Types.Assoc

Methods

rnf :: Assoc a -> () #

(MessagePack a, MessagePack b) => MessagePack (Assoc [(a, b)]) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: Assoc [(a, b)] -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (Assoc [(a, b)]) Source #

data Object Source #

Object Representation of MessagePack data.

Constructors

ObjectNil

represents nil

ObjectBool !Bool

represents true or false

ObjectInt !Int64

represents a negative integer

ObjectWord !Word64

represents a positive integer

ObjectFloat !Float

represents a floating point number

ObjectDouble !Double

represents a floating point number

ObjectStr !Text

extending Raw type represents a UTF-8 string

ObjectBin !ByteString

extending Raw type represents a byte array

ObjectArray ![Object]

represents a sequence of objects

ObjectMap ![(Object, Object)]

represents key-value pairs of objects

ObjectExt !Word8 !ByteString

represents a tuple of an integer and a byte array where the integer represents type information and the byte array represents data.

Instances
Eq Object Source # 
Instance details

Defined in Data.MessagePack.Types.Object

Methods

(==) :: Object -> Object -> Bool #

(/=) :: Object -> Object -> Bool #

Ord Object Source # 
Instance details

Defined in Data.MessagePack.Types.Object

Read Object Source # 
Instance details

Defined in Data.MessagePack.Types.Object

Show Object Source # 
Instance details

Defined in Data.MessagePack.Types.Object

Generic Object Source # 
Instance details

Defined in Data.MessagePack.Types.Object

Associated Types

type Rep Object :: Type -> Type #

Methods

from :: Object -> Rep Object x #

to :: Rep Object x -> Object #

Arbitrary Object Source # 
Instance details

Defined in Data.MessagePack.Types.Object

NFData Object Source # 
Instance details

Defined in Data.MessagePack.Types.Object

Methods

rnf :: Object -> () #

MessagePack Object Source # 
Instance details

Defined in Data.MessagePack.Types.Class

type Rep Object Source # 
Instance details

Defined in Data.MessagePack.Types.Object

type Rep Object = D1 (MetaData "Object" "Data.MessagePack.Types.Object" "msgpack-types-0.0.4-BWPsSOOupdH456JbwQYGI3" False) (((C1 (MetaCons "ObjectNil" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ObjectBool" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool))) :+: (C1 (MetaCons "ObjectInt" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Int64)) :+: (C1 (MetaCons "ObjectWord" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Word64)) :+: C1 (MetaCons "ObjectFloat" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Float))))) :+: ((C1 (MetaCons "ObjectDouble" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Double)) :+: (C1 (MetaCons "ObjectStr" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) :+: C1 (MetaCons "ObjectBin" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ByteString)))) :+: (C1 (MetaCons "ObjectArray" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Object])) :+: (C1 (MetaCons "ObjectMap" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [(Object, Object)])) :+: C1 (MetaCons "ObjectExt" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 Word8) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ByteString))))))

class MessagePack a where Source #

Minimal complete definition

Nothing

Methods

toObject :: a -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m a Source #

toObject :: (Generic a, GMessagePack (Rep a)) => a -> Object Source #

fromObject :: (Applicative m, Monad m, Generic a, GMessagePack (Rep a)) => Object -> m a Source #

Instances
MessagePack Bool Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Double Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Float Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Int Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Int8 Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Int16 Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Int32 Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Int64 Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Word Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Word8 Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Word16 Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Word32 Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Word64 Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack () Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: () -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m () Source #

MessagePack String Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Void Source # 
Instance details

Defined in Data.MessagePack.Types.Instances

MessagePack ByteString Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack ByteString Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Text Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Text Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack Object Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack a => MessagePack [a] Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: [a] -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m [a] Source #

MessagePack a => MessagePack (Maybe a) Source # 
Instance details

Defined in Data.MessagePack.Types.Instances

Methods

toObject :: Maybe a -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (Maybe a) Source #

MessagePack v => MessagePack (IntMap v) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

(MessagePack a, Unbox a) => MessagePack (Vector a) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

(MessagePack a, Storable a) => MessagePack (Vector a) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

MessagePack a => MessagePack (Vector a) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

(MessagePack a, MessagePack b) => MessagePack (Assoc [(a, b)]) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: Assoc [(a, b)] -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (Assoc [(a, b)]) Source #

(MessagePack a, MessagePack b) => MessagePack (Either a b) Source # 
Instance details

Defined in Data.MessagePack.Types.Instances

Methods

toObject :: Either a b -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (Either a b) Source #

(MessagePack a1, MessagePack a2) => MessagePack (a1, a2) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: (a1, a2) -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (a1, a2) Source #

(MessagePack k, MessagePack v, Ord k) => MessagePack (Map k v) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: Map k v -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (Map k v) Source #

(MessagePack k, MessagePack v, Hashable k, Eq k) => MessagePack (HashMap k v) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: HashMap k v -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (HashMap k v) Source #

(MessagePack a1, MessagePack a2, MessagePack a3) => MessagePack (a1, a2, a3) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: (a1, a2, a3) -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (a1, a2, a3) Source #

(MessagePack a1, MessagePack a2, MessagePack a3, MessagePack a4) => MessagePack (a1, a2, a3, a4) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: (a1, a2, a3, a4) -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (a1, a2, a3, a4) Source #

(MessagePack a1, MessagePack a2, MessagePack a3, MessagePack a4, MessagePack a5) => MessagePack (a1, a2, a3, a4, a5) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: (a1, a2, a3, a4, a5) -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (a1, a2, a3, a4, a5) Source #

(MessagePack a1, MessagePack a2, MessagePack a3, MessagePack a4, MessagePack a5, MessagePack a6) => MessagePack (a1, a2, a3, a4, a5, a6) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: (a1, a2, a3, a4, a5, a6) -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (a1, a2, a3, a4, a5, a6) Source #

(MessagePack a1, MessagePack a2, MessagePack a3, MessagePack a4, MessagePack a5, MessagePack a6, MessagePack a7) => MessagePack (a1, a2, a3, a4, a5, a6, a7) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: (a1, a2, a3, a4, a5, a6, a7) -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (a1, a2, a3, a4, a5, a6, a7) Source #

(MessagePack a1, MessagePack a2, MessagePack a3, MessagePack a4, MessagePack a5, MessagePack a6, MessagePack a7, MessagePack a8) => MessagePack (a1, a2, a3, a4, a5, a6, a7, a8) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: (a1, a2, a3, a4, a5, a6, a7, a8) -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (a1, a2, a3, a4, a5, a6, a7, a8) Source #

(MessagePack a1, MessagePack a2, MessagePack a3, MessagePack a4, MessagePack a5, MessagePack a6, MessagePack a7, MessagePack a8, MessagePack a9) => MessagePack (a1, a2, a3, a4, a5, a6, a7, a8, a9) Source # 
Instance details

Defined in Data.MessagePack.Types.Class

Methods

toObject :: (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Object Source #

fromObject :: (Applicative m, Monad m) => Object -> m (a1, a2, a3, a4, a5, a6, a7, a8, a9) Source #