Changes between Version 199 and Version 200 of TypeFunctionsStatus


Ignore:
Timestamp:
Sep 6, 2007 3:06:14 PM (7 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TypeFunctionsStatus

    v199 v200  
    33= Type Functions: Implementation Status = 
    44 
    5 '''Debugging of type family patch:''' 
     5'''Debugging of type families:''' 
    66 0. Check that the restrictions on equality constraints in instance and class contexts are enforced.  We should have tests for that in the testsuite.  Document the exact restrictions on the Haskell wiki tutorial page. 
    77 0. To fix `Simple8`: 
     
    1818 0. Fix core-lint breakage in cholewo-eval. 
    1919 0. The tests `tcfail068` and `rw` used to raise more type errors right away.  Now, we see less recovery. 
    20  0. To move GADT type checking from refinements to using equalities, proceed as follows (as suggested by SPJ): 
    21     * In `TcPat.tcConPat`: 
    22       * set `eq_spec' = []`, to get an empty refinement 
    23       * add the equalities from `eq_spec` to `theta'` (to propagate them instead of the refinement) 
    24     * Test whether this works (it basically disables the refinement mechanism without deleting it) 
     20 0. To move GADT type checking from refinements to equalities, proceed as follows (as suggested by SPJ): 
     21    * Implemented this as follows in `TcPat.tcConPat:579:` 
     22{{{ 
     23-             eq_spec' = substEqSpec tenv eq_spec 
     24+             eq_spec' = [] 
     25+              eq_preds = [mkEqPred (mkTyVarTy tv, ty) | (tv, ty) <- eq_spec] 
     26+             theta'   = substTheta  tenv (eq_theta ++ dict_theta ++ eq_preds) 
     27}}} 
     28    * Results: 
     29      * Works in principle. 
     30      * Immediately fixes the tests GADT3, GADT4 & GADT5. 
     31      * Unfortunately, it breaks a whole lot of tests in `gadt/`. 
     32      * The remaining problems are partially due to (1) the splitBoxyXXX function issue mentioned above, (2) the occurs check issue mentioned below, (3) the same problem exhibited by GADT9 (with or without this change), (4) some problems getting hold of the right given class constraints, and (5) some random stuff that I haven't looked at more closely. 
    2533    * In `TcUnify`, make all occurs checks more elaborate.  They should only '''defer''' if the checked variable occurs as part of an argument to a type family application; in other cases, still fail right away. 
    2634    * `TcGadt.tcUnifyTys` can now probably be replaced again by the non-side-effecting unifier that was in `types/Unify.hs` (recover from previous repo states).