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
; > | -Original Message- > | From: cvs-ghc-boun...@haskell.org [mailto:cvs-ghc-boun...@haskell.org] On > Behalf Of > | Paul Liu > | Sent: 10 October 2011 21:21 > | To: cvs-ghc@haskell.org > | Subject: help needed to understand weak reference and its design choice > | >

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

2011-10-11 Thread Simon Peyton-Jones
al Message- | From: cvs-ghc-boun...@haskell.org [mailto:cvs-ghc-boun...@haskell.org] On Behalf Of | Paul Liu | Sent: 10 October 2011 21:21 | To: cvs-ghc@haskell.org | Subject: help needed to understand weak reference and its design choice | | GHC.Weak says "A weak pointer expresses a relat

help needed to understand weak reference and its design choice

2011-10-10 Thread Paul Liu
GHC.Weak says "A weak pointer expresses a relationship between two objects, the key and the value: if the key is considered to be alive by the garbage collector, then the value is also alive. A reference from the value to the key does not keep the key alive." Am I right to say that if we use the