packages feed

RefSerialize 0.2.6 → 0.2.7

raw patch · 2 files changed

+43/−7 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.RefSerialize: instance [overlap ok] (Serialize a, Serialize b, Serialize c) => Serialize (a, b, c)
+ Data.RefSerialize: instance [overlap ok] (Serialize a, Serialize b, Serialize c, Serialize d) => Serialize (a, b, c, d)

Files

Data/RefSerialize.hs view
@@ -323,7 +323,7 @@            f x= do str <- rshowp (x:: a)                    return $ ", "++str -   readp = (readVar $ brackets $ commaSep $ rreadp)   <?> "rreadp:: [] "+   readp = (brackets $ commaSep $ rreadp)   <?> "rreadp:: [] "   @@ -333,15 +333,49 @@     showp (x, y)= do             sx <- rshowp x             sy <- rshowp y-            return $ "("++ sx ++ ", " ++ sy ++ ")"+            return $ "("++ sx ++ "," ++ sy ++ ")" -    readp = parens $ do+    readp =  parens (do             x <- rreadp             comma             y <- rreadp-            return (x,y)+            return (x,y))+            <?> "rreadp:: (,) " +instance (Serialize a, Serialize b, Serialize c) => Serialize (a, b,c) where+    showp (x, y, z)= do+            sx <- rshowp x+            sy <- rshowp y+            sz <- rshowp z+            return $ "("++ sx ++ "," ++ sy  ++"," ++ sz ++ ")" +    readp =  parens (do+            x <- rreadp+            comma+            y <- rreadp+            comma+            z <- rreadp+            return (x,y,z))+            <?> "rreadp:: (,,) "++instance (Serialize a, Serialize b, Serialize c, Serialize d) => Serialize (a, b,c, d) where+    showp (x, y, z, t)= do+            sx <- rshowp x+            sy <- rshowp y+            sz <- rshowp z+            st <- rshowp t+            return $ "("++ sx ++ "," ++ sy  ++"," ++ sz ++ "," ++ st ++ ")"++    readp =  parens (do+            x <- rreadp+            comma+            y <- rreadp+            comma+            z <- rreadp+            comma+            t <- rreadp+            return (x,y,z,t))+            <?> "rreadp:: (,,,) "  instance (Serialize a, Ord a, Serialize b) => Serialize (Map a b) where     showp m= showp $ M.toList m
RefSerialize.cabal view
@@ -1,5 +1,5 @@ name:                RefSerialize-version:             0.2.6+version:             0.2.7 synopsis:            Write to and read from Strings maintaining internal memory references description:                      Read, Show and Data.Binary do not check for internal data references to the same address.@@ -27,11 +27,13 @@                      .                      in this release:                             .-                            *  bug corrected: empty lists were written with two indirections (insertVar . insertVar). That caused an error in readp+                            *  bug in 0.2.5 corrected: empty lists were written with two indirections (insertVar . insertVar). That caused an error in readp                             .+                            *  bug in 0.2.6 corrected for lists+                            .                             *  removed the problematic instance (Show a, Read a) => Serialize a                             .-                            *  Added   instances for standard datatypes,+                            *  Added   instances for standard datatypes. More "deeper" instances favouring more variable usage                             .                             *  instance of Serialize [a] changed                      .