Re: Why doesn't GHC force a GC before program quits?

2012-04-17 Thread Paul Liu
as to guarantee that it won't do nasty things. Or maybe even get rid of the finalizer argument in mkWeak#, since they are not guaranteed to run anyway. Regards, Paul Liu On Tue, Apr 10, 2012 at 5:54 AM, Simon Marlow wrote: > On 03/04/2012 21:40, Paul Liu wrote: >> >> It seems to vi

Why doesn't GHC force a GC before program quits?

2012-04-03 Thread Paul Liu
It seems to violate the claim that "all finalizers are run exactly once" mentioned in the weak pointer paper. Is there any reason not to enforce this? -- Regards, Paul Liu ___ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.o

Re: casting between boxed type and unboxed type

2012-02-27 Thread Paul Liu
Thanks for the hints! I double checked, and found that it was actually using an older copy, that happens to have a different numbering in variable names that creates a mismatch. Regards, Paul Liu On Mon, Feb 27, 2012 at 4:46 AM, Simon Marlow wrote: > On 22/02/2012 19:43, Paul Liu wr

casting between boxed type and unboxed type

2012-02-22 Thread Paul Liu
ed and unboxed type? I'd imagine this is only safe when it's strict, but any implicit cast undocumented is bad. Besides, Ptr is not a strict datatype either. So under what occasions does GHC generate code like this? Any help is greatly appreciated

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

2011-10-11 Thread Paul Liu
memo table where both keys and values are weak pointers? Sure, it doesn't have the nice property that keys keep values alive, but I wonder how much difference it would be in practice. Regards, Paul Liu On Tue, Oct 11, 2011 at 1:07 AM, Simon Peyton-Jones wrote: > | I'm just trying t

help needed to understand weak reference and its design choice

2011-10-10 Thread Paul Liu
nderstand the design rationale behind GHC's weak references. Any help is greatly appreciated! Thanks! Regards, Paul Liu ___ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc

semantics of dataToTag and tagToEnum?

2011-10-03 Thread Paul Liu
aToTag Any hints will be greatly appreciated. Thanks a lot! -- Regards, Paul Liu ___ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc