[GHC] #12945: Backpack signature matching doesn't pick up orphan instances

#12945: Backpack signature matching doesn't pick up orphan instances -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: new Priority: high | Milestone: 8.2.1 Component: Compiler | Version: 8.1 (Type checker) | Keywords: backpack | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Repro: {{{ unit impl where module A where data T = T module B(module A, module B) where import A instance Show T where show T = "T" unit sig where signature B where data T = T instance Show T module App where import B app = print T unit main where dependency sig[B=impl:B] module Main where import App main = app }}} I get: {{{ ezyang@sabre:~$ ghc-head --backpack foo.bkp [1 of 3] Processing impl Instantiating impl [1 of 2] Compiling A (.hs -> .o) [2 of 2] Compiling B (.hs -> .o) [2 of 3] Processing sig [3 of 3] Processing main Instantiating main [1 of 1] Including sig[B=impl:B] Instantiating sig[B=impl:B] [1 of 2] Compiling B[sig] (.hsig -> .o) sig/sig-HVnmSw44WZeBfwnUur4wzl/../B.hi:1:1: error: No instance for (GHC.Show.Show impl:A.T) arising when attempting to show that instance [safe] GHC.Show.Show impl:A.T -- Defined in ‘impl:B’ is provided by ‘impl:B’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12945 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12945: Backpack signature matching doesn't pick up orphan instances
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: ezyang
Type: bug | Status: new
Priority: high | Milestone: 8.2.1
Component: Compiler (Type | Version: 8.1
checker) |
Resolution: | Keywords: backpack
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Edward Z. Yang

#12945: Backpack signature matching doesn't pick up orphan instances -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: closed Priority: high | Milestone: 8.2.1 Component: Compiler (Type | Version: 8.1 checker) | Resolution: fixed | Keywords: backpack Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by ezyang): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12945#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC