[GHC] #8893: -XPolyKinds causes "*** Exception: Prelude.(!!): index too large"

#8893: -XPolyKinds causes "*** Exception: Prelude.(!!): index too large" -----------------------------------+--------------------------------------- Reporter: ghorn | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Keywords: PolyKinds | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time crash Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -----------------------------------+--------------------------------------- The following program will compile fine: {{{ {-# OPTIONS_GHC -Wall #-} {-# Language DeriveFunctor #-} --{-# Language PolyKinds #-} module Bug where data V a = V [a] deriving Functor data C x a = C (V (P x a)) deriving Functor data P x a = P (x a) deriving Functor }}} But when PolyKinds is enabled, GHC crashes with {{{ $ ghc Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) Bug.hs:9:37:ghc: panic! (the 'impossible' happened) (GHC version 7.8.0.20140228 for x86_64-unknown-linux): Prelude.(!!): index too large }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8893 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8893: -XPolyKinds causes "*** Exception: Prelude.(!!): index too large" ---------------------------------------+----------------------------------- Reporter: ghorn | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: PolyKinds Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by ghorn): * cc: gregmainland@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8893#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8893: -XPolyKinds causes "*** Exception: Prelude.(!!): index too large" ---------------------------------------+----------------------------------- Reporter: ghorn | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: PolyKinds Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by goldfire): Confirmed reproducible in HEAD. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8893#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8893: -XPolyKinds causes "*** Exception: Prelude.(!!): index too large" ---------------------------------------+----------------------------------- Reporter: ghorn | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: PolyKinds Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by simonpj): Yes I'm on this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8893#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8893: -XPolyKinds causes "*** Exception: Prelude.(!!): index too large"
---------------------------------------+-----------------------------------
Reporter: ghorn | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.1-rc2
Resolution: | Keywords: PolyKinds
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time crash | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
---------------------------------------+-----------------------------------
Comment (by Simon Peyton Jones

#8893: -XPolyKinds causes "*** Exception: Prelude.(!!): index too large"
---------------------------------------+-----------------------------------
Reporter: ghorn | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.1-rc2
Resolution: | Keywords: PolyKinds
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time crash | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
---------------------------------------+-----------------------------------
Comment (by Simon Peyton Jones

#8893: -XPolyKinds causes "*** Exception: Prelude.(!!): index too large" -------------------------------------------------+------------------------- Reporter: ghorn | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: Resolution: | 7.8.1-rc2 Operating System: Unknown/Multiple | Keywords: Type of failure: Compile-time crash | PolyKinds Test Case: | Architecture: deriving/should_compile/T8893 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by simonpj): * status: new => merge * testcase: => deriving/should_compile/T8893 Comment: Thanks for an excellent test case! Austin, please merge. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8893#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8893: -XPolyKinds causes "*** Exception: Prelude.(!!): index too large" -------------------------------------------------+------------------------- Reporter: ghorn | Owner: Type: bug | Status: Priority: normal | closed Component: Compiler | Milestone: 7.8.1 Resolution: fixed | Version: Operating System: Unknown/Multiple | 7.8.1-rc2 Type of failure: Compile-time crash | Keywords: Test Case: | PolyKinds deriving/should_compile/T8893 | Architecture: Blocking: | Unknown/Multiple | Difficulty: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed * milestone: => 7.8.1 Comment: Merged. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8893#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC