[Haskell-cafe] IO and Wash

John Goerzen jgoerzen at complete.org
Wed Feb 16 10:51:50 EST 2005


On Wed, Feb 16, 2005 at 02:56:11PM -0000, Simon Marlow wrote:
> > the unsafe_io prevent that? 
> 
> You can avoid lots of unnecessary state-saving by judicious use of
> WASH's 'once' function.  eg.

Hmm.  I have tried this, but I'm not seeing any change in the amount of
saved state as a result of using once.

For instance, I have a selection screen.  People can select things
there, then go off and do things.  At various points, the user could
realize they made the wrong selection, so I call the selection screen
again.  However, even though I have once $ standardQuery $ ... in the
selection screen, all that state is saved...

I don't think I can use forever there either, because I'm using that
trick (which does seem to work) to enable returning to a yet earlier
page.

Maybe I'm missing what once does.

Thanks again for your help.

-- John


More information about the Haskell-Cafe mailing list