[GHC] #13819: TypeApplications-related GHC panic

GHC ghc-devs at haskell.org
Tue Jun 20 15:59:36 UTC 2017


#13819: TypeApplications-related GHC panic
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.2.1
       Component:  Compiler (Type    |              Version:  8.2.1-rc2
  checker)                           |             Keywords:
      Resolution:                    |  TypeApplications
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13846, #13850    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * related:   => #13846, #13850


Comment:

 Two more ways to trigger this panic:

 * #13846:

 {{{
 $ ghci -XTypeApplications -ignore-dot-ghci
 GHCi, version 8.3.20170605: http://www.haskell.org/ghc/  :? for help
 Prelude> :t fmap @(_ -> _)
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.3.20170605 for x86_64-unknown-linux):
         repSplitAppTys
   w0_a1pF[tau:2]
   w0_a1pH[tau:2]
   []
   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:809:9 in ghc:Type

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

 * #13850

 {{{
 > cat wibble.hs
 ecase :: Either a b -> (a -> c) (b -> c) -> c
 ecase (Left a) f _ = f a
 ecase (Right b) _ g = g b

 > ghci wibble.hs
 GHCi, version 8.2.0.20170507: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/erikd/.ghci
 [1 of 1] Compiling Main             ( wibble.hs, interpreted )
 ghc: panic! (the 'impossible' happened)
  (GHC version 8.2.0.20170507 for x86_64-unknown-linux): repSplitAppTys
  a_a1pA[sk:1]
  c_a1pC[sk:1]
  []
  Call stack:
   CallStack (from HasCallStack):
    prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1134:58
 in
          ghc:Outputable
    callStackDoc, called at compiler/utils/Outputable.hs:1138:37 in
          ghc:Outputable
    pprPanic, called at compiler/types/Type.hs:808:9 in ghc:Type
 }}}

 Both of these were also caused by
 b207b536ded40156f9adb168565ca78e1eef2c74.

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


More information about the ghc-tickets mailing list