Re: [GHC] #14038: TypeApplications regression in GHC HEAD: ‘p0’ is untouchable inside the constraints: ()

GHC ghc-devs at haskell.org
Thu Jul 27 14:20:11 UTC 2017


#14038: TypeApplications regression in GHC HEAD: ‘p0’ is untouchable inside the
constraints: ()
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.4.1
       Component:  Compiler (Type    |              Version:  8.3
  checker)                           |             Keywords:
      Resolution:                    |  TypeApplications
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13877            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Richard, in a `-DDEBUG` compiler this falls over with
 {{{
 Following filled tyvar a_a225[tau:2] = a_a220[sk:2]
 Unfilled tyvar a_a220[sk:2]
 flatten/appty
   (p0_a226[tau:2] |> T14038.D:R:Funk1:->k2[0] <k1>_N <k2>_N)
   '[]
   p0_a226[tau:2]
   '[]
   nominal
   nominal
 flatten } p0_a226[tau:2] '[]
 New coercion hole: a23h
 Emitting new coercion holeghc-stage1: panic! (the 'impossible' happened)
   (GHC version 8.3.20170726 for x86_64-unknown-linux):
         piResultTy
   Fun [a_a220[sk:2]] (':->) *
   '[]
   Call stack:
       ?callStack, called at compiler/utils/Util.hs:1394:50 in ghc:Util
         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:949:35 in ghc:Type

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

 }}}
 I think what is happening is that we start with `(p0_a226 |> co) '[]`,
 where `p0_a226 :: Fun [a_a220[sk:2]] (':->) *`, and `co` casts it to
 a function type.  But then flattening throws away the cats, apparently,
 and we try to form `(mkAppTy p0_a226 '[])`, which is simply ill-kinded.

 I have (again) lost track of what is supposed to happen here.

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


More information about the ghc-tickets mailing list