[commit: ghc] master: Make Core Lint check for locally-bound GlobalIds (d59c59f)

git at git.haskell.org git at git.haskell.org
Mon Dec 15 10:06:06 UTC 2014


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

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

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

commit d59c59f4d106a5d0dff0ecb164f7a669bee03c13
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Sat Dec 13 22:53:54 2014 +0000

    Make Core Lint check for locally-bound GlobalIds
    
    There should be no bindings in this module for a GlobalId;
    except after CoreTidy, when top-level bindings are globalised.
    
    To check for this, I had to make the CoreToDo pass part of the
    environment that Core Lint caries.  But CoreToDo is defined in
    CoreMonad, which (before this patch) called CoreLint.
    
    So I had to do quite a bit of refactoring, moving some
    lint-invoking code into CoreLint itself.  Crucially, I also
    more tcLookupImported_maybe, importDecl, and checkwiredInTyCon
    from TcIface (which use CoreLint) to LoadIface (which doesn't).
    This is probably better structure anyway.
    
    So most of this patch is refactoring. The actual check for
    GlobalIds is in CoreLint.lintAndScopeId


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

d59c59f4d106a5d0dff0ecb164f7a669bee03c13
 compiler/coreSyn/CoreLint.hs    | 358 ++++++++++++++++++++++++++++++++++------
 compiler/coreSyn/CorePrep.hs    |   3 +-
 compiler/deSugar/Desugar.hs     |   3 +-
 compiler/iface/LoadIface.hs     | 156 +++++++++++++++++
 compiler/iface/TcIface.hs       | 149 -----------------
 compiler/main/HscMain.hs        |   2 +-
 compiler/main/TidyPgm.hs        |   7 +-
 compiler/simplCore/CoreMonad.hs | 205 -----------------------
 compiler/simplCore/SimplCore.hs |   1 +
 compiler/typecheck/TcEnv.hs     |   2 +-
 10 files changed, 470 insertions(+), 416 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 d59c59f4d106a5d0dff0ecb164f7a669bee03c13


More information about the ghc-commits mailing list