|
Re: [GHC] #913: instance Ord (StableName a): msg#00152lang.haskell.glasgow.bugs
#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@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [GHC] #951: stage2 on sparc dies with "schedule: re-entered unsafely", GHC |
|---|---|
| Next by Date: | Re: [GHC] #905: the `impossible' happened: ASSERT failed! file codeGen/ClosureInfo.lhs, line 596, GHC |
| Previous by Thread: | [GHC] #951: stage2 on sparc dies with "schedule: re-entered unsafely", GHC |
| Next by Thread: | Re: [GHC] #913: instance Ord (StableName a), GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |