[Haskell-cafe] Top-level TVars
simonpj at microsoft.com
Wed Dec 14 04:06:22 EST 2005
newTVarIO in the HEAD, and therefore it's in any nightly-build snapshot,
which you can freely download.
The next major release will be 6.6, but it's a few months off.
Meanwhile I hope you can use the workaround that Tomasz posted.
| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Joel
| Sent: 13 December 2005 18:08
| To: Haskell-Cafe Cafe
| Subject: [Haskell-cafe] Top-level TVars
| Can this be done now or is this a GHC 6.5 feature?
| My combination of unsafePerformIO with atomically $ newTVar does not
| seem to be working.
| Thanks, Joel
| P.S. What is the ETA for 6.5?
| On Mon, Dec 05, 2005 at 10:50:13AM -0000, Simon Peyton-Jones wrote:
| > It turns out to be easy to provide
| > newTVarIO :: a -> IO (TVar a)
| > which you can call from inside 'unsafePerformIO'. That means you
| > allocate top-level TVars without fuss.
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
More information about the Haskell-Cafe