[GHC] #14880: GHC panic: updateRole

GHC ghc-devs at haskell.org
Fri Oct 26 13:04:55 UTC 2018


#14880: GHC panic: updateRole
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.2
       Component:  Compiler (Type    |              Version:  8.2.2
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:  15592
 Related Tickets:  #15076            |  Differential Rev(s):  Phab:D4769,
                                     |  Phab:D5141, Phab:D5147, Phab:D5150,
       Wiki Page:                    |  Phab:D5208
-------------------------------------+-------------------------------------

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

 In [changeset:"503514b94f8dc7bd9eab5392206649aee45f140b/ghc" 503514b/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="503514b94f8dc7bd9eab5392206649aee45f140b"
 Fix nasty bug in the type free-var finder, at last

 Consider the type
   forall k. b -> k
 where
   b :: k -> Type

 Here the 'k' in b's kind must be a different 'k' to the forall k,
 because 'b' is free in the expression.  So we must return 'k'
 among the free vars returned from tyCoVarsOfType applied that
 type.  But we weren't.

 This is an outright bug, although we don't have a program that
 fails because of it.

 It's easy to fix, too: see TyCoRep
   Note [Closing over free variable kinds]

 This fix has been in the pipeline for ages because it fell into
 the Trac #14880 swamp.  But this patch nails it.
 }}}

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


More information about the ghc-tickets mailing list