Can you please explain this: ....the parameters baked into the thunk may be infinite.... >
daryoush On Sat, Apr 10, 2010 at 6:27 AM, Svein Ove Aas <svein....@aas.no> wrote: > On Sat, Apr 10, 2010 at 11:19 AM, Jon Fairbairn > <jon.fairba...@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 > succeed. > > (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@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe