| > I think you are really asking for some way to create top-level
| > transactional variables?
| 
| Yes. Perhaps it would be easier to do it cleanly than arbitrary
| top-level IO bindings?

It turns out to be easy to provide

        newTVarIO :: a -> IO (TVar a)

which you can call from inside 'unsafePerformIO'.  That means you can
allocate top-level TVars without fuss.

The whole question of top-level IO remains open, but this will address
the immediate question very nicely.  

I've also added a SourceForge bug to remind us to fail more tidily if
you do atomically inside atomically.

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

Reply via email to