Skip to content
Snippets Groups Projects
Commit d30b9cf4 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Another refactoring of constraints

1. Rejig CtLoc
   * CtLoc is now *not* parameterised (much simpler)
   * CtLoc includes the "depth" of the constraint
   * CtLoc includes the TcLclEnv at the birthplace
     That gives (a) the SrcSpan, (b) the [ErrCtxt]
     (c) the [TcIdBinder]
   * The CtLoc of a constraint is no longer in its CtEvidence
   * Where we passed 'depth' before, now we pass CtLoc

2. Some significant refactoring in TcErrors
   * Get rid of cec_extra
   * Traverse every constraint, so that we can be
     sure to generate bindings where necessary.
     (This was really a lurking bug before.)

3. Merge zonking into TcCanonical.  This turned out to be
   almost trivial; just a small change to TcCanonical.flattenTyVar.

   The nice consequence is that we don't need to zonk a constraint
   before solving it; instead it gets zonked "on the fly" as it were.
parent 06832583
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment