RE: Bug in STM with data invariants

2009-02-25 Thread Simon Peyton-Jones
g] On Behalf Of Ben Franksen | Sent: 24 February 2009 19:50 | To: glasgow-haskell-users@haskell.org | Subject: Bug in STM with data invariants | | My ghc(i) crashes when using STM data invariants. This little piece of code | demonstrates the problem: | | module Bug where | | import Control.Concurren

Bug in STM with data invariants

2009-02-24 Thread Ben Franksen
My ghc(i) crashes when using STM data invariants. This little piece of code demonstrates the problem: module Bug where import Control.Concurrent.STM test = do x <- atomically $ do v <- newTVar 0 always $ return True -- remove this line and all is fine return v atomically (readTVa