Persistant (as in on disk) data

Iavor S. Diatchki diatchki@cse.ogi.edu
Tue, 04 Mar 2003 10:01:55 -0800


hello,

a recent post reminded me of a feature i'd like.
for all i know it is already implemenetd in GHC so pointers are welcome.

i'd like to be able to dump data structures to disk, and later load 
them.  currently i do that with Show/Read but it is very slow and it 
seems as a kind of "ovarloaded" use fo Show. and it doesn't work with 
circular structures.  so i'm thinking something like "deriving 
Persistant".  for functions perhaps the easiest thing is to leave it to 
the user to create the instances.  perhaps:

class Persistant t where
   save :: t -> String -> IO ()
   load :: String -> IO t

here the String is the name of the file where to store/load the data.

so is there such a thing already, and if not would it be difficult to 
add to say GHC?

bye
iavor




-- 
==================================================
| Iavor S. Diatchki, Ph.D. student               |
| Department of Computer Science and Engineering |
| School of OGI at OHSU                          |
| http://www.cse.ogi.edu/~diatchki               |
==================================================