Skip to content
  • Apoorv Ingle's avatar
    8d15eadc
    Killing cc_fundeps, streamlining kind equality orientation, and type equality processing order · 8d15eadc
    Apoorv Ingle authored and Marge Bot's avatar Marge Bot committed
    Fixes: #217093
    Associated to #19415
    
    This change
    * Flips the orientation of the the generated kind equality coercion in canEqLHSHetero;
    * Removes `cc_fundeps` in CDictCan as the check was incomplete;
    * Changes `canDecomposableTyConAppOk` to ensure we process kind equalities before type equalities and avoiding a call to `canEqLHSHetero` while processing wanted TyConApp equalities
    * Adds 2 new tests for validating the change
       - testsuites/typecheck/should_compile/T21703.hs and
       - testsuites/typecheck/should_fail/T19415b.hs (a simpler version of T19415.hs)
    * Misc: Due to the change in the equality direction some error messages now have flipped type mismatch errors
    * Changes in Notes:
      - Note [Fundeps with instances, and equality orientation] supercedes Note [Fundeps with instances]
      - Added Note [Kind Equality Orientation] to visualize the kind flipping
      - Added Note [Decomposing Dependent TyCons and Processing Wanted Equalties]
    8d15eadc
    Killing cc_fundeps, streamlining kind equality orientation, and type equality processing order
    Apoorv Ingle authored and Marge Bot's avatar Marge Bot committed
    Fixes: #217093
    Associated to #19415
    
    This change
    * Flips the orientation of the the generated kind equality coercion in canEqLHSHetero;
    * Removes `cc_fundeps` in CDictCan as the check was incomplete;
    * Changes `canDecomposableTyConAppOk` to ensure we process kind equalities before type equalities and avoiding a call to `canEqLHSHetero` while processing wanted TyConApp equalities
    * Adds 2 new tests for validating the change
       - testsuites/typecheck/should_compile/T21703.hs and
       - testsuites/typecheck/should_fail/T19415b.hs (a simpler version of T19415.hs)
    * Misc: Due to the change in the equality direction some error messages now have flipped type mismatch errors
    * Changes in Notes:
      - Note [Fundeps with instances, and equality orientation] supercedes Note [Fundeps with instances]
      - Added Note [Kind Equality Orientation] to visualize the kind flipping
      - Added Note [Decomposing Dependent TyCons and Processing Wanted Equalties]
Loading