[Haskell] Simple and Easy Persistence
Bulat Ziganshin
bulatz at HotPOP.com
Thu Dec 8 11:15:03 EST 2005
Hello Krasimir,
Thursday, December 08, 2005, 5:40:15 PM, you wrote:
KA> the stream. What I want is to have a single Binary library that is
KA> fast and that have all these features:
KA> - fast implementation
KA> - optional serialization of cyclic datastructures
KA> - optional support for bit level serialization
KA> - automatic class derivation based on TH
KA> If there are voluntiers I would like to cooperate in the development.
imho, it's better to start from NewBinary library and add features of
SerTH to it. i can make TH support. btw, where i can download
NewBinary version about you talk? there is many different variations.
one disadvantage of original Binary library as well as all its
derivatives is support only for memory- and Handle-oriented streams.
my library instead accepts any stream, you just provide functions to
read/write when create Binary object. i propose to add this facility
too, smth like:
createBinary readF writeF = return Binary {readF=readF,writeF=writeF}
createBinary4File h = createBinary (hGetChar h) (hPutChar h)
createBinary4Memory addr size = do ptr <- newIORef addr
let read = do ...
write = do ...
createBinary read write
--
Best regards,
Bulat mailto:bulatz at HotPOP.com
More information about the Haskell
mailing list