Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : tc-untouchables
http://hackage.haskell.org/trac/ghc/changeset/d30b9cf45793c9e674463c86345931cbae345e7a >--------------------------------------------------------------- commit d30b9cf45793c9e674463c86345931cbae345e7a Author: Simon Peyton Jones <[email protected]> Date: Mon Sep 10 10:01:51 2012 +0100 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. compiler/typecheck/Inst.lhs | 101 ++------ compiler/typecheck/TcCanonical.lhs | 417 ++++++++++++++--------------- compiler/typecheck/TcErrors.lhs | 509 +++++++++++++++--------------------- compiler/typecheck/TcExpr.lhs | 2 +- compiler/typecheck/TcInteract.lhs | 207 +++++++-------- compiler/typecheck/TcMType.lhs | 26 +-- compiler/typecheck/TcRnMonad.lhs | 9 +- compiler/typecheck/TcRnTypes.lhs | 157 +++++------ compiler/typecheck/TcRules.lhs | 8 +- compiler/typecheck/TcSMonad.lhs | 90 ++++--- compiler/typecheck/TcSimplify.lhs | 28 ++- compiler/typecheck/TcType.lhs | 19 +- compiler/typecheck/TcUnify.lhs | 9 +- 13 files changed, 695 insertions(+), 887 deletions(-) Diff suppressed because of size. To see it, use: git show d30b9cf45793c9e674463c86345931cbae345e7a _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
