RefSerialize-0.4.0: Write to and read from ByteStrings maintaining internal memory references

Safe HaskellNone
LanguageHaskell98

Data.RefSerialize.Serialize

Synopsis

Documentation

type MFun = Char Source #

data ShowF Source #

Constructors

Expr ByteString 
Var Int 

Instances

data Error Source #

Constructors

Error String 

data StatW Source #

Constructors

StatW (Context, [ShowF], ByteString) 

data STW a Source #

Constructors

STW (StatW -> (StatW, a)) 

Instances

Monad STW Source #

monadic serialization

Methods

(>>=) :: STW a -> (a -> STW b) -> STW b #

(>>) :: STW a -> STW b -> STW b #

return :: a -> STW a #

fail :: String -> STW a #

Functor STW Source # 

Methods

fmap :: (a -> b) -> STW a -> STW b #

(<$) :: a -> STW b -> STW a #

Applicative STW Source # 

Methods

pure :: a -> STW a #

(<*>) :: STW (a -> b) -> STW a -> STW b #

(*>) :: STW a -> STW b -> STW b #

(<*) :: STW a -> STW b -> STW a #

assocs :: (Hashable a, HashTable h, Ord a) => h RealWorld a b -> [(a, b)] Source #

insert :: (Hashable k, Eq k, HashTable h) => k -> v -> h RealWorld k v -> h RealWorld k v Source #

delete :: (Hashable k, Eq k, HashTable h) => k -> h RealWorld k v -> h RealWorld k v Source #

lookup :: (Hashable k, Eq k, HashTable h) => k -> h RealWorld k v -> Maybe v Source #

toList :: (Hashable k, Eq k, HashTable h) => h RealWorld k v -> [(k, v)] Source #

fromList :: (Hashable k, Eq k, HashTable h) => [(k, v)] -> h RealWorld k v Source #

addrHash :: Context -> a -> IO (Either Int Int) Source #

return a unique hash identifier for an object the context assures that no StableName used in addrStr is garbage collected, so the hashes are constant and the correspondence address - string remain one to one as long as the context is not garbage collected. Left is returned if it is the first time that addHash is called for that variable

hasht :: a -> (Int, t) Source #

varName :: t -> [Char] Source #

two variables that point to the same address will have identical varname (derived from import System.Mem.StableName)varName:: a -> String . The stable names of during the serializing deserializing process are not deleted . This is assured by the pointers in the context, so the hash values remain and the comparison of varNames is correct.