RefSerialize-0.2.3: Write to and read from Strings maintaining internal memory references
Data.RefSerialize
Synopsis
module Data.Parser
class Serialize c whereSource
Methods
showp :: c -> ST StringSource
readp :: ST cSource
rshowp :: c -> ST StringSource
rreadp :: ST cSource
Instances
rShow :: Serialize c => c -> StringSource
rRead :: Serialize c => String -> cSource
insertVar :: (a -> ST String) -> a -> ST StringSource
insert a variable at this position. and the expression value in the where part. runW rshowp (1::Int) -> 1 runW (insertVar rshowp) (1::Int) -> v1 where { v1=1} This is useful when the object is referenced many times
readVar :: Serialize c => ST c -> ST cSource
varName :: a -> [Char]Source
runR :: ST a -> String -> aSource
runW :: ST String -> StringSource