[GHC] #15828: Type family equation foralls allow strange re-quantification of class-bound type variables

GHC ghc-devs at haskell.org
Mon Oct 29 20:08:58 UTC 2018


#15828: Type family equation foralls allow strange re-quantification of class-bound
type variables
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.7
      Resolution:                    |             Keywords:  TypeFamilies
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Shamefully, the answer is not to pass the `mb_cls` to the call to
 `bindLHsTyVarBndrs` in `rnFamInstEqn` -- always pass `Nothing`. If an
 associated class is passed in, then `bindLHsTyVarBndrs` uses the in-scope
 class variables, which is not what's wanted here. Really, only
 `bindHsQTyVars` should pass a non-`Nothing` in this parameter.

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


More information about the ghc-tickets mailing list