[Redirecting to libraries]

 

Your suggestion seems plausible to me:

-          export everything from GHC.Conc; import this only if you know what you are doing

-          export STM, TVar only abstractly from Control.Concurrent.STM; this is the interface for ordinary users

 

This sounds like a candidate for the standard library modification process, if someone wants to put it into action.

                http://haskell.org/haskellwiki/Library_submissions

 

Simon

 

From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] On Behalf Of Sterling Clover
Sent: 27 February 2008 20:15
To: glasgow-haskell-users@haskell.org
Subject: Exports of STM constructors.

 

I was recently bitten by the urge to hack around with STM, and discovered to my dismay that there's no way to get at the primitive constructors for TVar and STM, both of which are defined in GHC.Conc. Given that, when we so desire, we can get at the primitives to break IO into pieces, manually unbox integers and such, and that the primitives for working with MVars are similarly exposed through appropriate imports, it would be really nice (or, well, at least fun) to be able to do the same for STM.

--S