[Haskell-cafe] Re: persist and retrieve of IO type?
Jon Fairbairn
jon.fairbairn at cl.cam.ac.uk
Sat Apr 10 05:19:42 EDT 2010
Ivan Lazar Miljenovic <ivan.miljenovic at gmail.com> writes:
> Daryoush Mehrtash <dmehrtash at gmail.com> writes:
>
>> Is there a way to persist a [IO ()] to say a file then retrieve it later and
>> execute it using a sequence function?
>
> I'm not sure I understand what you're wanting... you can pass around
> values of type "IO ()" around, but they won't be executed until you
> actually use them...
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.
--
Jón Fairbairn Jon.Fairbairn at cl.cam.ac.uk
More information about the Haskell-Cafe
mailing list