[Haskell-cafe] How to hold common data

Graham Klyne GK at ninebynine.org
Thu May 13 11:59:08 EDT 2004

At 16:09 12/05/04 +0000, scott west wrote:
>Hello all,
>    I'm new to haskell and was just wondering if there was any efficient 
> or standard way to store and modify some sort of state data. The 
> functional nature of haskell has me confused in this respect! Basically 
> what I want to achieve is an interactive program that allows you to edit 
> some tables, and thus hold some data. I dont' need to be spoonfed an 
> answer, but a general guideline would be very helpful :) Thanks for any 
> help you could provide!

Have you looked at using a state monad?

I recommend the following paper.  I found it a very useful and motivating 
introduction to monads:

Simon Peyton-Jones and John Launchbury, State in Haskell, linked from: 
document at: 
http://research.microsoft.com/Users/simonpj/Papers/state-lasc.ps.gz, also 
at: http://www.cse.ogi.edu/~jl/Papers/stateThreads.ps.

(I have some other Haskell references that I found useful when learning 
Haskell over the past year, at 
http://www.ninebynine.org/Links.html#Programming-Haskell .)


Graham Klyne
For email:

More information about the Haskell-Cafe mailing list