Changes between Version 1 and Version 2 of TypeFunctions/IntegratedSolver


Ignore:
Timestamp:
Dec 3, 2008 6:18:32 AM (7 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TypeFunctions/IntegratedSolver

    v1 v2  
    1717It already processes both equalities and class constraints, but only to simplify the type parameters of class constraints, no attempt to simplify them is made. 
    1818 
     19Predicate solver 
     20{{{ 
     21reduceList :: RedEnv -> [Inst] -> Avails -> TcM Avails 
     22}}} 
     23 
    1924=== Module structure === 
    2025 
     
    2328 2. We could have a new module `TcTyPred` that gets all the class constraint solver code from `TcSimplify`.  The code that coordinates solving of equalities with class constraints should go into `TcTyFuns` as it needs to do the preparatory normalising of types (lifting out family synonym applications) and similar things that are due to type families.  `TcTyFuns` will then invoke functions in `TcTyPred` to perform class solving steps.  
    2429To me, the second option is more appealing as I expect it to keep interfaces smaller. 
     30 
     31=== Functional dependencies === 
     32 
     33Currently, `tcImproveOne` generates pairs of types to be unified (on the basis of the FD improvement rules) and does unify them with `unifyType` (via `unifyEqns`).  In the integrated solver, `tcImproveOne` should generate equality constraints instead.  This will get rid of the `extra_eqs` that we currently have in `reduceContext`.