RefSerialize 0.2.8 → 0.2.8.1
raw patch · 2 files changed
+9/−7 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Data.RefSerialize.Serialize: assocs :: Ord a => HashTable a b -> [(a, b)]
+ Data.RefSerialize.Serialize: empty :: IO (HashTable Int val)
+ Data.RefSerialize.Serialize: fromList :: [(Int, val)] -> HashTable Int val
+ Data.RefSerialize.Serialize: hasht :: a -> (Int, t)
+ Data.RefSerialize.Serialize: insert :: key -> val -> HashTable key val -> HashTable key val
+ Data.RefSerialize.Serialize: lookup :: key -> HashTable key val -> Maybe val
+ Data.RefSerialize.Serialize: toList :: HashTable key val -> [(key, val)]
+ Data.RefSerialize.Serialize: varName :: a -> [Char]
- Data.RefSerialize: showHexp :: (Num a, Integral a) => a -> ST ()
+ Data.RefSerialize: showHexp :: (Num a, Integral a, Show a) => a -> ST ()
Files
- Data/RefSerialize.hs +6/−6
- RefSerialize.cabal +3/−1
Data/RefSerialize.hs view
@@ -230,14 +230,14 @@ readHexp = ST(\(Stat(c,s,v)) -> let us= unpack s l= readHex us- in if Prelude.null l then Left . Error $ "not readable: " ++ us+ in if Prelude.null l then Left . Error $ "readHexp: not readable: " ++ us else let ((x,str2):_)= l in Right(Stat(c, pack $ Prelude.dropWhile isSpace str2,v),x) ) <?> "readHexp " -showHexp :: (Num a,Integral a) => a -> ST ()+showHexp :: (Num a,Integral a,Show a) => a -> ST () showHexp var= ST(\(Stat(c,s,v)) -> Right(Stat(c, s `append` " " `append` (pack $ showHex var ""),v),())) <?> "showHexp " -- |if a is an instance of Show, showpText can be used as the showp method@@ -363,10 +363,10 @@ readVar :: Serialize c => ST c -> ST c readVar (ST f)= ST(\(Stat(c,s,v))-> let- s1= B.dropWhile isSpace s- (var, str2) = B.span isAlphaNum s1- str3= B.dropWhile isSpace str2- nvar= numVar $ unpack var+ s1= B.dropWhile isSpace s+ (var, str2) = B.span isAlphaNum s1+ str3= B.dropWhile isSpace str2+ nvar= numVar $ unpack var in if B.null var then Left (Error "expected variable name" ) else
RefSerialize.cabal view
@@ -1,5 +1,5 @@ name: RefSerialize-version: 0.2.8+version: 0.2.8.1 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.@@ -26,6 +26,8 @@ See demo.hs and tutorial. . in this release:+ .+ * 0.2.8.1 fixed problem with showHex Show constraint in the latter version of Numeric . * Serialization instance now includes an internal wiriter .