[Haskell-cafe] Re: Sometimes I wish there was a global variable

2009-03-21 Thread Maurí­cio
Notice that rotX, rotY and pos are meant to be used as comunication between the keyboardMouse and display functions. They need to be set as 0 first, so display won't do anything. Only when they user press a few buttons that those values change, so display behaves accordanly. In a state-based lang

Re: [Haskell-cafe] Re: Sometimes I wish there was a global variable

2009-03-22 Thread Rafael Cunha de Almeida
Maurí­cio wrote: >> Notice that rotX, rotY and pos are meant to be used as comunication >> between the keyboardMouse and display functions. They need to be set as >> 0 first, so display won't do anything. Only when they user press a few >> buttons that those values change, so display behaves accord

Re: [Haskell-cafe] Re: Sometimes I wish there was a global variable

2009-03-22 Thread Felipe Lessa
On Sun, Mar 22, 2009 at 08:10:28PM -0300, Rafael Cunha de Almeida wrote: > Doing it like that I could have all the definitions in one module, but > it doesn't solve another important problem: keyboardMouse and display > functions have to have as many parameters as there are IORefs. You may always

Re: [Haskell-cafe] Re: Sometimes I wish there was a global variable

2009-03-22 Thread Brandon S. Allbery KF8NH
On 2009 Mar 22, at 19:10, Rafael Cunha de Almeida wrote: Doing it like that I could have all the definitions in one module, but it doesn't solve another important problem: keyboardMouse and display functions have to have as many parameters as there are IORefs. Or a single argument which holds a

Re: [Haskell-cafe] Re: Sometimes I wish there was a global variable

2009-03-22 Thread Simon Richard Clarkstone
Ok, replying to the list this time. Darn Thunderbird not reading my mind again. Rafael Cunha de Almeida wrote: Maurí­cio wrote: In one module, you can write: -- giveMeFunctions = do { newIORef ... newIORef ... newIORef ... (...) let f1 = ... let f2 = ... r