
#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 ekmett): What you want here has a number of problems. 1.) It conflicts with `IncoherentInstances` by randomly changing answers based on inlining. 2.) It doesn't really interact well with the notion of typechecking producing a witness that holds the elaborated code and just using the witness. 3.) We actually '''have''' to take the "nearest" instance when you bind instances in local scope. Why? `ImplicitParams` unfortunately exist. If you have `(?x :: Int)` in scope and you come across `let ?x = 12 :: Int in ...` you need to switch to the new witness of `(?x :: Int)`. The same should work if you open a `Dict (?x :: Int)`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9701#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler