[GHC] #14326: Panic on COMPLETE pragma with mismatched type variable order

GHC ghc-devs at haskell.org
Thu Oct 5 17:05:36 UTC 2017


#14326: Panic on COMPLETE pragma with mismatched type variable order
-------------------------------------+-------------------------------------
           Reporter:  dailectic      |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:  x86_64         |   Type of failure:  Compile-time
  (amd64)                            |  crash or panic
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The motivating example is to allow patterns with phantom types to interact
 nicely with TypeApplications, so in the below we can do `L @Int :: a -> L
 a Int` to specify the phantom.
 {{{#!hs
 data E a b = L' a | R b
 pattern L :: forall b a. a -> E a b
 pattern L a = L' a
 {-# COMPLETE L, R #-}
 }}}

 The compiler balks

 {{{
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.2.1 for x86_64-unknown-linux):
         mkOneConFull: Not TyConApp:
   c_a50V
   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/deSugar/Check.hs:976:30 in ghc:Check

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

 }}}

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


More information about the ghc-tickets mailing list