[GHC] #11148: T9563 doesn't pass with reversed uniques

#11148: T9563 doesn't pass with reversed uniques -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- It fails with {{{ T9563.hs:18:1: error: • Can't make a derived instance of ‘Generic1 (G Int b Float)’: No family instance for ‘G Int b Float’ • In the stand-alone deriving instance for ‘Generic1 (G Int b Float)’ }}} Steps to reproduce: 1. Change line `TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-$(GhcPackageDbFlag) -rtsopts $(EXTRA_HC_OPTS)` to `TEST_HC_OPTS = -dinitial-unique=16777206 -dunique-increment=-1 -fforce- recomp -dcore-lint -dcmm-lint -dno-debug-output -no- user-$(GhcPackageDbFlag) -rtsopts $(EXTRA_HC_OPTS)` in `mk/test.mk` 2. `make TESTS=T9563` -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11148 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11148: T9563 doesn't pass with reversed uniques -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: 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 niteria): * cc: simonmar, simonpj (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11148#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11148: T9563 doesn't pass with reversed uniques -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: 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 simonpj): * cc: kosmikus, RyanGlScott (added) Comment: Andres, Ryan: any ideas? This is in the `Generics` area. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11148#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11148: T9563 doesn't pass with reversed uniques -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: 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 RyanGlScott): I'm not immediately sure what's wrong, but it doesn't seem specific to `Generic1`. In fact, you can get the same error if you change `Generic1` to `Functor`, `Foldable`, or `Traversable`. It seems that something about typeclasses with kind `(* -> *) -> Constraint` triggers this, since I can derive `Eq`, `Ord`, `Read`, `Show`, `Data`, and `Lift` for `G Int b Float d` without any issue. Another clue is that `data instance F A a = AData a deriving Generic1` works fine, but `data instance F b a = AData a deriving Generic1` triggers this error, so you need at least one type variable in a data instance for this to happen. Perhaps the type variable in the data family declaration and the type variable in the data family instance have conflicting `Unique`s when reversed? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11148#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11148: T9563 doesn't pass with reversed uniques
-------------------------------------+-------------------------------------
Reporter: niteria | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
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 Simon Peyton Jones

#11148: T9563 doesn't pass with reversed uniques -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | deriving/should_compile/T11148 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * testcase: => deriving/should_compile/T11148 * resolution: => fixed Comment: Fixed, with a test case (using Functor) added. Thank you for identifying this bug! Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11148#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11148: T9563 doesn't pass with reversed uniques
-------------------------------------+-------------------------------------
Reporter: niteria | Owner:
Type: bug | Status: closed
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.10.2
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| deriving/should_compile/T11148
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#11148: T9563 doesn't pass with reversed uniques -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: bug | Status: merge Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | deriving/should_compile/T11148 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: closed => merge Comment: Merged tiny, outright bug fix to `ghc-8.0` as a885f485d3a017658a29b7436f875e7d457b0c81. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11148#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11148: T9563 doesn't pass with reversed uniques -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | deriving/should_compile/T11148 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11148#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC