[GHC] #11560: panic: isInjectiveTyCon sees a TcTyCon

#11560: panic: isInjectiveTyCon sees a TcTyCon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I typed this into ghci and it panicked. Not sure whether the declaration is really valid anyways, but ghci shouldn't panic on it. {{{ rwbarton@morphism:~/ghc-newest$ ./inplace/bin/ghc-stage2 --interactive GHCi, version 8.1.20160201: http://www.haskell.org/ghc/ :? for help Prelude> :set -XTypeFamilies -XTypeInType Prelude> :m +Data.Kind Prelude Data.Kind> type family T (l :: *) (k :: l) :: * where { T * Int = * } ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.1.20160201 for x86_64-unknown-linux): isInjectiveTyCon sees a TcTyCon T Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11560 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11560: panic: isInjectiveTyCon sees a TcTyCon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): The panic is also present in version 8.0.0.20160123. (Note both these versions are slightly out of date so it's possible this is fixed already.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11560#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11560: panic: isInjectiveTyCon sees a TcTyCon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * keywords: => TypeInType Comment: I'll mark this as a TypeInType ticket since I don't know how to cause the panic without TypeInType, though of course it may really be an issue with injective type families. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11560#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11560: panic: isInjectiveTyCon sees a TcTyCon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): Apparently I was supposed to write {{{ ... where { T (*) Int = * } }}} or {{{ ... where { T Type Int = * } }}} Some bad interaction with TypeOperators perhaps? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11560#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11560: panic: isInjectiveTyCon sees a TcTyCon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by jstolarek): * cc: jstolarek (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11560#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11560: panic: isInjectiveTyCon sees a TcTyCon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): I can't reproduce this with GHC 8.1.20161125: {{{ $ /opt/ghc/head/bin/ghci GHCi, version 8.1.20161125: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci λ> :set -XTypeFamilies -XTypeInType λ> :m +Data.Kind λ> type family T (l :: *) (k :: l) :: * where { T * Int = * } <interactive>:3:46: error: • Mismatched type name in type family instance. Expected: T Actual: * • In the type family declaration for ‘T’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11560#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11560: panic: isInjectiveTyCon sees a TcTyCon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * owner: => goldfire Comment: This panic is gone (even in 8.0.1), but the code should be accepted. It's indeed a `TypeInType` error, and I imagine has nothing at all to do with injective type families. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11560#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11560: panic: isInjectiveTyCon sees a TcTyCon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): I take it the fix for this would be the same as the fix needed for #11307 and #11400? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11560#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11560: panic: isInjectiveTyCon sees a TcTyCon
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.1
checker) |
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Richard Eisenberg

#11560: panic: isInjectiveTyCon sees a TcTyCon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: fixed | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11560#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC