On Wednesday 06 December 2006 07:40, Bernie Pope wrote:
> On 05/12/2006, at 1:00 PM, Benjamin Franksen wrote:
> > Bernie Pope wrote:
> >> If you want a global variable then you can use something like:
> >>
> >>     import System.IO.Unsafe (unsafePerformIO)
> >>
> >>     global = unsafePerformIO (newIORef [])
> >>
> >> But this is often regarded as bad programming style (depends who
> >> you talk to).
> >
> > Besides, isn't this example /really/ unsafe? I thought, at least
> > the IORef
> > has to be monomorphic or else type safety is lost?
>
> Perhaps your question is rhetorical, 

Half-way ;-) I was pretty sure but not 100%. Thanks for the nice 
example.

Cheers,
Ben
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to