Skip to content
  • Simon Peyton Jones's avatar
    Fix Trac #3017: ensure that we quantify over enough type variables when equalities are involved · e5a8d57c
    Simon Peyton Jones authored
    The function FunDeps.grow was not doing the right thing when type equality
    constraints were involved.  That wasn't really its fault: its input was
    being filtered by fdPredsOfInsts.
    
    To fix this I did a bit of refactoring, so that the (revolting) fdPredsOfInsts
    is now less important (maybe we can get rid of it in due course).  The 'grow'
    function moves from FunDeps to
    	 Inst.growInstsTyVars
    	 TcMTType.growThetaTyVars
    	 TcMType.growTyVars
    
    The main comments are with the first of these, in
    Note [Growing the tau-tvs using constraints] in Inst.
    
    Push to the branch if conflict free.
    
    e5a8d57c