[GHC] #14579: GeneralizedNewtypeDeriving produces ambiguously-kinded code

GHC ghc-devs at haskell.org
Wed Dec 13 18:25:34 UTC 2017


#14579: GeneralizedNewtypeDeriving produces ambiguously-kinded code
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.2.2
  checker)                           |
      Resolution:                    |             Keywords:  deriving
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4264
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 simonpj's hunch appears to be right—I just attempted to compile GHC with
 goldfire's suggested change, and wound up face-first in panictown:

 {{{
 libraries/base/GHC/Generics.hs:811:13: error:ghc-stage1: panic! (the
 'impossible' happened)
   (GHC version 8.5.20171213 for x86_64-unknown-linux):
         No skolem info:
   [p3_a3Jl]
   Call stack:
       CallStack (from HasCallStack):
         callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in
 ghc:Outputable
         pprPanic, called at compiler/typecheck/TcErrors.hs:2892:5 in
 ghc:TcErrors
 }}}

 I'll try simonpj's suggested refactoring in comment:3.

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


More information about the ghc-tickets mailing list