Re: help needed to understand weak reference and its design choice

2011-10-12 Thread Simon Marlow
Perhaps it could be optimised, though. Cheers, Simon S | -Original Message- | From: Paul Liu [mailto:nine...@gmail.com] | Sent: 11 October 2011 22:20 | To: Simon Peyton-Jones | Cc: cvs-ghc@haskell.org | Subject: Re: help needed to understand weak reference and its design choice

RE: help needed to understand weak reference and its design choice

2011-10-12 Thread Simon Peyton-Jones
tuff fully paged out. S | -Original Message- | From: Paul Liu [mailto:nine...@gmail.com] | Sent: 11 October 2011 22:20 | To: Simon Peyton-Jones | Cc: cvs-ghc@haskell.org | Subject: Re: help needed to understand weak reference and its design choice | | Hi Simon, thanks a lot for the point

Re: help needed to understand weak reference and its design choice

2011-10-11 Thread Paul Liu
Hi Simon, thanks a lot for the pointer! I was kind of wondering why mkWeak# has an IO type, and the paper made it much clearer that it's not about reachability from the Weak# object, but the side effect that's between key and value objects. Just out of curiosity, why not implement a memo table wh

RE: help needed to understand weak reference and its design choice

2011-10-11 Thread Simon Peyton-Jones
| I'm just trying to understand the design rationale behind GHC's weak | references. Any help is greatly appreciated! Thanks! Did you read the paper http://research.microsoft.com/en-us/um/people/simonpj/papers/weak.htm It gives the design rationale in detail. Simon | -Original Message-