[Haskell-cafe] Re: [Haskell] Re: Global Variables and IO initializers
ahey at iee.org
Mon Nov 8 15:32:49 EST 2004
On Monday 08 Nov 2004 12:26 pm, Lennart Augustsson wrote:
> Keean Schupke wrote:
> > Adrian Hey wrote:
> >> The first step to solving a problem is to at least recognise
> >> that it exists. What is "bizarre" is that so many folk seem
> >> to be in denial over this. Perhaps you would like to show
> >> me your solution to the "oneShot" problem.
> > Why are you unable to give a concrete real world
> > example of why this is necessary then. Even your
> > example of real world hardware that must be
> > initialised once fails! (What if I start two copies
> > of the program?)
> Indeed. With hardware the solution is to do
> hdl <- openDevice
> which will succeed the first time and then return
> "busy" until closed.
How will it know it's "busy"? Please show me the
code for your hypothetical openDevice.
More information about the Haskell-Cafe