[GHC] #14904: Compiler panic (piResultTy)

GHC ghc-devs at haskell.org
Mon Jun 18 07:23:44 UTC 2018


#14904: Compiler panic (piResultTy)
-------------------------------------+-------------------------------------
        Reporter:  kcsongor          |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler (Type    |              Version:  8.2.2
  checker)                           |
      Resolution:  fixed             |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  typecheck/should_fail/T14904a,
                                     |  typecheck/should_fail/T14904b
      Blocked By:                    |             Blocking:
 Related Tickets:  #14873            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"30b029bea9abe1f5f2855d9e7f0ae26a18cf049b/ghc"
 30b029be/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="30b029bea9abe1f5f2855d9e7f0ae26a18cf049b"
 Fix typechecking of kind signatures

 When typechecking a type like
    Maybe (a :: <kind-sig>)
 with a kind signature, we were using tc_lhs_kind to
 typecheck the signature.  But that's utterly wrong; we
 need the signature to be fully solid (non unresolved
 equalities) before using it.  In the case of Trac #14904
 we went on to instantiate the kind signature, when it
 still had embedded unsolved constraints.  This tripped
 the level-checking assertion when unifying a variable.

 The fix looks pretty easy to me: just call tcLHsKind
 instead.  I had to add KindSigCtxt to
 }}}

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


More information about the ghc-tickets mailing list