[Haskell-cafe] Top-level TVars
Simon Peyton-Jones
simonpj at microsoft.com
Thu Dec 15 04:04:39 EST 2005
Yes, they do
| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Joel
| Reymont
| Sent: 14 December 2005 20:39
| To: Tomasz Zielonka
| Cc: Simon Marlow; Haskell-Cafe Cafe
| Subject: Re: [Haskell-cafe] Top-level TVars
|
|
| > On Wed, Dec 14, 2005 at 02:17:17PM -0000, Simon Marlow wrote:
| >> Suppose you create two top-level IORefs with the same type, like
| >> this:
| >>
| >> var1 = unsafePerformIO $ newIORef 0
| >> var2 = unsafePerformIO $ newIORef 0
| >>
| >> GHC's CSE optimisation will common these up - after all, it's the
| >> same
| >> expression, so it must yield the same result, right?
|
| Do these have to be within the same module for the CSE optimization
| to kick in?
|
| --
| http://wagerlabs.com/
|
|
|
|
|
| _______________________________________________
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list