[Haskell-cafe] Re: persist and retrieve of IO type?
dmehrtash at gmail.com
Sat Apr 10 13:32:01 EDT 2010
Can you please explain this:
....the parameters baked into the thunk may be infinite....
On Sat, Apr 10, 2010 at 6:27 AM, Svein Ove Aas <svein.ove at aas.no> wrote:
> On Sat, Apr 10, 2010 at 11:19 AM, Jon Fairbairn
> <jon.fairbairn at cl.cam.ac.uk> wrote:
> > It sounds more like he wants two functions something like
> > save:: FilePath -> [IO ()] -> IO ()
> > restore:: FilePath -> IO [IO ()]
> > to which the answer would be no.
> It's an insoluble problem in general - the parameters baked into the
> thunk may be infinite, or at least too large to persist, and the
> functions may not be around if you try to load the persisted data into
> a different version of the executable - but it's an interesting
> problem to attempt solving.
> Given that GHC 6.12 has added some of the base functionality required
> (i.e. dynamic linking), I was planning to take a bash at it
> (persisting functions in general, not just IO actions) in the summer.
> I don't know if that would help you, though. It's certainly not a good
> idea in general, and at any rate there's a good chance I won't
> (Of course, thunks aren't /actually/ infinite, in memory. Part of the
> project would be an attempt to persist the thunks, allowing lazy
> evaluation after reading them back in. Naturally this would only work
> with the exact same executable, but that's not necessarily a problem.)
> Svein Ove Aas
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe