diff options
| author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-09-03 09:10:26 +0100 |
|---|---|---|
| committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-09-03 09:20:35 +0100 |
| commit | dfa8ef031c83998c163bb94fb84ff8e02ef86cf8 (patch) | |
| tree | 419031d9a9985af5319a21f1cb0e7ef09a9c9249 /compiler/coreSyn/CorePrep.lhs | |
| parent | e52554768ad28bd0c191826100786b1aee3295dc (diff) | |
| download | haskell-dfa8ef031c83998c163bb94fb84ff8e02ef86cf8.tar.gz | |
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.
Diffstat (limited to 'compiler/coreSyn/CorePrep.lhs')
| -rw-r--r-- | compiler/coreSyn/CorePrep.lhs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/coreSyn/CorePrep.lhs b/compiler/coreSyn/CorePrep.lhs index d87fdfc197..1a21253f39 100644 --- a/compiler/coreSyn/CorePrep.lhs +++ b/compiler/coreSyn/CorePrep.lhs @@ -172,7 +172,7 @@ corePrepPgm dflags hsc_env binds data_tycons = do floats2 <- corePrepTopBinds initialCorePrepEnv implicit_binds return (deFloatTop (floats1 `appendFloats` floats2)) - endPass dflags CorePrep binds_out [] + endPass hsc_env CorePrep binds_out [] return binds_out corePrepExpr :: DynFlags -> HscEnv -> CoreExpr -> IO CoreExpr |
