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.
Showing
- compiler/typecheck/Inst.lhs 23 additions, 78 deletionscompiler/typecheck/Inst.lhs
- compiler/typecheck/TcCanonical.lhs 202 additions, 215 deletionscompiler/typecheck/TcCanonical.lhs
- compiler/typecheck/TcErrors.lhs 215 additions, 294 deletionscompiler/typecheck/TcErrors.lhs
- compiler/typecheck/TcExpr.lhs 1 addition, 1 deletioncompiler/typecheck/TcExpr.lhs
- compiler/typecheck/TcInteract.lhs 90 additions, 117 deletionscompiler/typecheck/TcInteract.lhs
- compiler/typecheck/TcMType.lhs 10 additions, 16 deletionscompiler/typecheck/TcMType.lhs
- compiler/typecheck/TcRnMonad.lhs 5 additions, 4 deletionscompiler/typecheck/TcRnMonad.lhs
- compiler/typecheck/TcRnTypes.lhs 69 additions, 88 deletionscompiler/typecheck/TcRnTypes.lhs
- compiler/typecheck/TcRules.lhs 5 additions, 3 deletionscompiler/typecheck/TcRules.lhs
- compiler/typecheck/TcSMonad.lhs 49 additions, 41 deletionscompiler/typecheck/TcSMonad.lhs
- compiler/typecheck/TcSimplify.lhs 16 additions, 12 deletionscompiler/typecheck/TcSimplify.lhs
- compiler/typecheck/TcType.lhs 5 additions, 14 deletionscompiler/typecheck/TcType.lhs
- compiler/typecheck/TcUnify.lhs 5 additions, 4 deletionscompiler/typecheck/TcUnify.lhs
Loading
Please register or sign in to comment