[GHC] #13300: panic! isInjectiveTyCon sees a TcTyCon W

#13300: panic! isInjectiveTyCon sees a TcTyCon W -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following code causes the compiler to panic {{{ #!haskell {-# LANGUAGE GADTs #-} data W where WI :: Int WD :: Double data Superblock = A { f :: W } | B { f :: W } }}} {{{ [1 of 1] Compiling Main ( src/Main.hs, .stack- work/dist/x86_64-linux/Cabal-1.24.2.0/build/hdf5/hdf5-tmp/Main.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-unknown-linux): isInjectiveTyCon sees a TcTyCon W Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug -- While building package hdf5-0.1.0.0 using: /home/siddhu/.stack/setup-exe-cache/x86_64-linux/setup-Simple- Cabal-1.24.2.0-ghc-8.0.2 --builddir=.stack- work/dist/x86_64-linux/Cabal-1.24.2.0 build exe:hdf5 --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 1 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13300 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13300: panic! isInjectiveTyCon sees a TcTyCon W -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): For those like me who failed to spot the error immediately, the correct error message is (from 7.10) {{{ W.hs:4:3: Data constructor ‘WI’ returns type ‘Int’ instead of an instance of its parent type ‘W’ In the definition of data constructor ‘WI’ In the data declaration for ‘W’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13300#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13300: panic! isInjectiveTyCon sees a TcTyCon W
-------------------------------------+-------------------------------------
Reporter: siddhanathan | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#13300: panic! isInjectiveTyCon sees a TcTyCon W -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: Fine in HEAD. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13300#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13300: panic! isInjectiveTyCon sees a TcTyCon W -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): Fixed by the fix for #13271 I suppose? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13300#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13300: panic! isInjectiveTyCon sees a TcTyCon W -------------------------------------+------------------------------------- Reporter: siddhanathan | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Actually this particular one appeared to be fixed before; I'm not sure how. But we have a regression test for it now, so all good. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13300#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC