
#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