[commit: ghc] master: Improve Linting in GHCi (fixes Trac #8215) (dfa8ef0)

git at git.haskell.org git at git.haskell.org
Tue Sep 3 10:21:11 CEST 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/dfa8ef031c83998c163bb94fb84ff8e02ef86cf8/ghc

>---------------------------------------------------------------

commit dfa8ef031c83998c163bb94fb84ff8e02ef86cf8
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Sep 3 09:10:26 2013 +0100

    Improve Linting in GHCi (fixes Trac #8215)
    
    The original problem was that we weren't bringing varaibles bound in the
    interactive context into scope before Linting the result of a top-level
    declaration in GHCi.  (We were doing this for expressions.)
    
    Moreover I found that we weren't Linting the result of desugaring
    a GHCi expression, which we really should be doing.
    
    It took me a bit of time to unravel all this, and I did some refactoring
    to make it easier next time.
    
      * CoreMonad contains the Lint wrappers that get the right
        environments into place.  It always had endPass and lintPassResult
        (which Lints bindings), but now it has lintInteractiveExpr.
    
      * Both use a common function CoreMonad.interactiveInScope to find
        those in-scope variables.
    
    Quite a bit of knock-on effects from this, but nothing exciting.


>---------------------------------------------------------------

dfa8ef031c83998c163bb94fb84ff8e02ef86cf8
 compiler/coreSyn/CoreLint.lhs    |   23 ++++++++---
 compiler/coreSyn/CorePrep.lhs    |    2 +-
 compiler/deSugar/Desugar.lhs     |   29 ++++++-------
 compiler/main/HscMain.hs         |   48 +++++++++-------------
 compiler/main/TidyPgm.lhs        |    2 +-
 compiler/simplCore/CoreMonad.lhs |   84 +++++++++++++++++++++++++++++++-------
 compiler/simplCore/SimplCore.lhs |   15 +++----
 7 files changed, 131 insertions(+), 72 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc dfa8ef031c83998c163bb94fb84ff8e02ef86cf8




More information about the ghc-commits mailing list