Re: [Haskell-cafe] number of references to a variable

2008-11-02 Thread wren ng thornton
Andrew Coppin wrote: Jan-Willem Maessen wrote: Usually the clever thing you want to know is this is the sole reference to the pointed-to object. Does GHC have weak references? (I seem to recall it does...) http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-Mem-Weak.html

Re: [Haskell-cafe] number of references to a variable

2008-11-02 Thread wren ng thornton
Alberto G. Corona wrote: * Certainly a worthy research goal, but probably not what you had in mind :) *Not at all, My interest on that was on to improve RefSerialize. Although the Clean people has done a superb job on optimization. By the way, I'm not sure if uniqueness is the cause of his

[Haskell-cafe] number of references to a variable

2008-11-01 Thread Alberto G. Corona
Is there a way to know the number of memory references for a variable?. The runtime must know it but i do not know if this available for the program trough any low level trick Thanks ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] number of references to a variable

2008-11-01 Thread Andrew Coppin
Alberto G. Corona wrote: Is there a way to know the number of memory references for a variable?. The runtime must know it but i do not know if this available for the program trough any low level trick More precisely, the GC computes it each time it runs. (And only computes it precisely

Re: [Haskell-cafe] number of references to a variable

2008-11-01 Thread Jan-Willem Maessen
On Nov 1, 2008, at 9:38 AM, Andrew Coppin wrote: Alberto G. Corona wrote: Is there a way to know the number of memory references for a variable?. The runtime must know it but i do not know if this available for the program trough any low level trick More precisely, the GC computes it

Re: [Haskell-cafe] number of references to a variable

2008-11-01 Thread Andrew Coppin
Jan-Willem Maessen wrote: On Nov 1, 2008, at 9:38 AM, Andrew Coppin wrote: Alberto G. Corona wrote: Is there a way to know the number of memory references for a variable?. The runtime must know it but i do not know if this available for the program trough any low level trick More