Improve error reporting for "relevant bindings" again (Trac #8233)
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 10 Sep 2013 16:55:59 +0000 (17:55 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 10 Sep 2013 16:55:59 +0000 (17:55 +0100)
commit9039108b2d9ad746d47f3917cdfb7a44a4a41ccf
tree602c5b00db862cea27314980e32ccec8ad3284f1
parente365d4963f1061878269502f256b4a56ca273a78
Improve error reporting for "relevant bindings" again (Trac #8233)

This patch makes a number of related improvements:

* Displays relevant bindings in innermost-first order.
  The inner ones are closer to the error.

* Does not display syntactically top-level bindings,
  unless you say -fno-max-relevant-bindings.
  This is what Trac #8233 was mainly about

* Makes the TopLevelFlag in a TcIdBinder really mean
  "syntactically top level".  It was a bit vague before.

There was some associated simplification, because we no longer
need to pas a TopLevelFlag to tcMonoBinds and friends.
compiler/typecheck/TcBinds.lhs
compiler/typecheck/TcClassDcl.lhs
compiler/typecheck/TcEnv.lhs
compiler/typecheck/TcErrors.lhs
compiler/typecheck/TcInstDcls.lhs
compiler/typecheck/TcRnTypes.lhs
docs/users_guide/using.xml