Pickling

Patrik Jansson patrikj@cs.chalmers.se
Tue, 21 Aug 2001 14:49:40 +0200 (MET DST)


On Tue, 21 Aug 2001, Mark Carroll wrote:
> I figured it would be quite a waste having the computer convert the data
> to human-readable form and then parsing it again when a human's not going
> to be reading the intervening datastream. Even just converting the numbers
> to ASCII and back takes time when there's quite a few of them.
> Of course, I can get by with an inefficient version where I have to write
> some pickling and unpickling code for lots of my types, until something
> better shows up! I assume it will someday.

I am not sure about the status for ghc but there is

a Binary class (even with deriving) in the nhc compiler
  http://www.cs.york.ac.uk/fp/nhc98/libs/Binary.html

a Native class in hbc
  http://www.cs.chalmers.se/~augustss/hbc/hbc_library.html#Native
  (For downloading hbc, read
   http://www.haskell.org/pipermail/haskell/2001-June/001331.html)

A quick search for ghc Binary gave me this links which seems to provide a
port nhc's Binary that works with ghc.

   http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne/haskell_libs/Binary.html

   You could ask Sven Panne directly for details.

I hope this helps,
  Patrik Jansson