msgpack 0.7.1.1 → 0.7.1.2
raw patch · 2 files changed
+12/−9 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- Data/MessagePack/Pack.hs +11/−8
- msgpack.cabal +1/−1
Data/MessagePack/Pack.hs view
@@ -28,7 +28,7 @@ import qualified Data.HashMap.Strict as HM import qualified Data.Map as M import qualified Data.IntMap as IM-import Data.Monoid+import qualified Data.Monoid as Monoid import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Text.Lazy as TL@@ -40,6 +40,9 @@ import Data.MessagePack.Assoc import Data.MessagePack.Internal.Utf8 +(<>) :: Monoid.Monoid m => m -> m -> m+(<>) = Monoid.mappend+ -- | Serializable class class Packable a where -- | Serialize a value@@ -132,10 +135,10 @@ <> pf bs instance Packable a => Packable [a] where- from = fromArray length (mconcat . map from)+ from = fromArray length (Monoid.mconcat . map from) instance Packable a => Packable (V.Vector a) where- from = fromArray V.length (V.foldl (\a b -> a <> from b) mempty)+ from = fromArray V.length (V.foldl (\a b -> a <> from b) Monoid.mempty) instance (Packable a1, Packable a2) => Packable (a1, a2) where from = fromArray (const 2) f where@@ -183,19 +186,19 @@ <> pf arr instance (Packable k, Packable v) => Packable (Assoc [(k,v)]) where- from = fromMap length (mconcat . map fromPair) . unAssoc+ from = fromMap length (Monoid.mconcat . map fromPair) . unAssoc instance (Packable k, Packable v) => Packable (Assoc (V.Vector (k,v))) where- from = fromMap V.length (V.foldl (\a b -> a <> fromPair b) mempty) . unAssoc+ from = fromMap V.length (V.foldl (\a b -> a <> fromPair b) Monoid.mempty) . unAssoc instance (Packable k, Packable v) => Packable (M.Map k v) where- from = fromMap M.size (mconcat . map fromPair . M.toList)+ from = fromMap M.size (Monoid.mconcat . map fromPair . M.toList) instance Packable v => Packable (IM.IntMap v) where- from = fromMap IM.size (mconcat . map fromPair . IM.toList)+ from = fromMap IM.size (Monoid.mconcat . map fromPair . IM.toList) instance (Packable k, Packable v) => Packable (HM.HashMap k v) where- from = fromMap HM.size (mconcat . map fromPair . HM.toList)+ from = fromMap HM.size (Monoid.mconcat . map fromPair . HM.toList) fromPair :: (Packable a, Packable b) => (a, b) -> Builder fromPair (a, b) = from a <> from b
msgpack.cabal view
@@ -1,5 +1,5 @@ Name: msgpack-Version: 0.7.1.1+Version: 0.7.1.2 Synopsis: A Haskell implementation of MessagePack Description: A Haskell implementation of MessagePack <http://msgpack.org/> Homepage: http://msgpack.org/