[GHC] #14055: Panic on type error inside a type-level newtype (with -XTypeInType)

GHC ghc-devs at haskell.org
Sat Jul 29 20:16:54 UTC 2017


#14055: Panic on type error inside a type-level newtype (with -XTypeInType)
-------------------------------------+-------------------------------------
           Reporter:  luqui          |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1
           Keywords:                 |  Operating System:  MacOS X
       Architecture:  x86_64         |   Type of failure:  Compile-time
  (amd64)                            |  crash or panic
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{#!hs
 {-# LANGUAGE TypeInType, TypeFamilies #-}

 newtype X = RollX (() -> X)

 type family F t :: X where
     F t = RollX (t -> ())
 }}}

 gives

 {{{
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.2.1 for x86_64-apple-darwin):
         repSplitAppTys
   t_a1po[sk:1]
   ()
   []
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
 ghc:Outputable
         pprPanic, called at compiler/types/Type.hs:808:9 in ghc:Type
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14055>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list