
Reverting to the main thread, I'm not sure where this discussion is going. The base assumption is if multiple type-class instances match (e.g. from two enclosing pattern matches, comment:2, or from an enclosing
#9701: GADTs not specialized properly -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Runtime | Blocked By: performance bug | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by dfeuer): Replying to [comment:11 simonpj]: patten-match and the top level) then you are on terribly thin ice is you want to predict which one will be chosen. They are all supposed to have the same value, and if they don't then, well, the ice is thin. Edward Kmett raised two concerns about the sort of specialization I was trying to accomplish: that it would break implicit parameters in some fashion and that it would break incoherent instances, I was attempting to allay those concerns, the latter by showing that the incoherent ice is so thin it's just not worth worrying about—there's so little exploitable predictability about it that we shouldn't worry about making it less predictable. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9701#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler