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 | ==================================================

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to