
I've been reading the STM papers on Simon PJ's website, but I find that the GHC I'm using (6.5) changes a few things from the paper's descriptions. For instance, "atomic" becomes "atomically" and "catch" becomes "catchSTM". I can't, however, find "throw", and the type signature of "check" has changed. The GHC documentation isn't much help. Is there a discussion, perhaps in a mailing list archive somewhere, that will shed some light on these changes? Thanks, -Rod

Rodney D Price wrote:
I've been reading the STM papers on Simon PJ's website, but I find that the GHC I'm using (6.5) changes a few things from the paper's descriptions. For instance, "atomic" becomes "atomically" and "catch" becomes "catchSTM". I can't, however, find "throw", and the type signature of "check" has changed. The GHC documentation isn't much help. Is there a discussion, perhaps in a mailing list archive somewhere, that will shed some light on these changes?
I had the same question about check's signature last night. But I do believe that throw is the same old throw :: Exception -> a from Control.Exception. Cheers, Koray

'check' isn't in any public version of GHC just yet. We have the code, but have not yet gotten it into the main darcs repository. Sorry. Simon | -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] | On Behalf Of S Koray Can | Sent: 13 July 2006 03:13 | To: glasgow-haskell-users@haskell.org | Subject: Re: STM check operation | | Rodney D Price wrote: | > I've been reading the STM papers on Simon PJ's website, but I find that | > the GHC I'm using (6.5) changes a few things from the paper's | > descriptions. | > For instance, "atomic" becomes "atomically" and "catch" becomes | > "catchSTM". | > I can't, however, find "throw", and the type signature of "check" has | > changed. | > The GHC documentation isn't much help. Is there a discussion, perhaps in | > a mailing list archive somewhere, that will shed some light on these | > changes? | | I had the same question about check's signature last night. But I do | believe that throw is the same old throw :: Exception -> a from | Control.Exception. | | Cheers, | Koray | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Thanks for your reply. I'm a bit confused, however. There is a function "check :: Bool -> STM a" in the STM library, but it appears to act differently than the one described in the paper. This version of check seems to cause a transaction to block when its (check's) first argument is False, rather than issue an error or exception. Is this right? -Rod On Jul 13, 2006, at 8:00 AM, Simon Peyton-Jones wrote:
'check' isn't in any public version of GHC just yet. We have the code, but have not yet gotten it into the main darcs repository. Sorry.
Simon
| -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users-bounces@haskell.org] | On Behalf Of S Koray Can | Sent: 13 July 2006 03:13 | To: glasgow-haskell-users@haskell.org | Subject: Re: STM check operation | | Rodney D Price wrote: | > I've been reading the STM papers on Simon PJ's website, but I find that | > the GHC I'm using (6.5) changes a few things from the paper's | > descriptions. | > For instance, "atomic" becomes "atomically" and "catch" becomes | > "catchSTM". | > I can't, however, find "throw", and the type signature of "check" has | > changed. | > The GHC documentation isn't much help. Is there a discussion, perhaps in | > a mailing list archive somewhere, that will shed some light on these | > changes? | | I had the same question about check's signature last night. But I do | believe that throw is the same old throw :: Exception -> a from | Control.Exception. | | Cheers, | Koray | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

| Thanks for your reply. I'm a bit confused, however. There is a | function | "check :: Bool -> STM a" in the STM library, but it appears to act | differently than the one described in the paper. This version of check | seems to cause a transaction to block when its (check's) first argument | is False, rather than issue an error or exception. Is this right?] True, alas. In 6.4.2, 'check' is defined thus: check :: Bool -> STM a check b = if b then return undefined else retry But in 6.6 that's changing to the new semantics described in the invariants paper. Sorry. Simon
participants (3)
-
Rodney D Price
-
S Koray Can
-
Simon Peyton-Jones