
#11311: segmentation fault/panic with -XTypeInType and functions of type * -> * -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 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: -------------------------------------+------------------------------------- Since `* :: *`, I can specialize a function of type `a -> a` to type `* -> *`. This seems like potentially not a great idea, and GHCi agrees: {{{ rwbarton@morphism:/tmp$ ~/ghc-newest/inplace/bin/ghc-stage2 --interactive GHCi, version 7.11.20151228: http://www.haskell.org/ghc/ :? for help Prelude> :set -XTypeInType Prelude> import Data.Kind Prelude Data.Kind> :t id :: * -> * id :: * -> * :: * -> * Prelude Data.Kind> (id :: * -> *) undefined `seq` () Segmentation fault }}} Also, when compiling a module containing the above expression, I get a panic while producing Cmm: {{{ rwbarton@morphism:/tmp$ ~/ghc-newest/inplace/bin/ghc-stage2 t [1 of 1] Compiling Main ( t.hs, t.o ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.11.20151228 for x86_64-unknown-linux): idToReg sat_sKV }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11311 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler