Re: [GHC] #913: instance Ord (StableName a)
#913: instance Ord (StableName a) -+-- Reporter: ekarttun | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 6.10 branch Component: libraries/base |Version: 6.4.2 Severity: normal | Resolution: wontfix Keywords: | Difficulty: Easy (1 hr) Testcase: | Architecture: Unknown Os: Unknown | -+-- Changes (by igloo): * status: new = closed * resolution: = wontfix Comment: Please follow the library submissions process for this: http://www.haskell.org/haskellwiki/Library_submissions -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/913#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #913: instance Ord (StableName a)
#913: instance Ord (StableName a) -+-- Reporter: ekarttun | Owner: Type: feature request | Status: new Priority: normal | Milestone: 6.10 branch Component: libraries/base |Version: 6.4.2 Severity: normal | Resolution: Keywords: | Difficulty: Easy (1 hr) Testcase: | Architecture: Unknown Os: Unknown | -+-- Changes (by simonmar): * milestone: 6.8 branch = 6.10 branch -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/913#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #913: instance Ord (StableName a)
#913: instance Ord (StableName a) -+-- Reporter: ekarttun | Owner: Type: feature request | Status: new Priority: normal | Milestone: 6.8 Component: libraries/base |Version: 6.4.2 Severity: normal | Resolution: Keywords: | Difficulty: Easy (1 hr) Testcase: | Architecture: Unknown Os: Unknown | -+-- Changes (by simonmar): * milestone: = 6.8 * testcase: = Comment: I think this is possible. hashStableName says that it doesn't guarantee to be unique, but I think that's only because StableName identifiers can be reused. There is a danger that one of the SNs might get GC'd just after we call stableNameToInt# on it and the identity could be reused by newStableName in another thread, but the original comparison would still be valid. Conclusion: just call stableNameToInt# on the two stable names and compare the Int#s. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/913 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #913: instance Ord (StableName a)
#913: instance Ord (StableName a) -+-- Reporter: ekarttun | Owner: Type: feature request | Status: new Priority: normal | Milestone: 6.8 Component: libraries/base |Version: 6.4.2 Severity: normal | Resolution: Keywords: | Difficulty: Easy (1 hr) Testcase: | Architecture: Unknown Os: Unknown | -+-- Comment (by simonmar): From Jan-Willem Maessen: I feel like I may have already run into this problem with the Eq instance of stableNames. But I was never able to verify for sure that this was going on, and it's rather hard to guarantee that the object referred to by the stable name actually outlives the Int# (if we stick to Haskell code alone). If I ever get a reproducible bug whose symptoms I understand, I'll let you know. :-) But just to make sure you are aware that this could actually be causing trouble in practice. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/913 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs