Skip to content
Snippets Groups Projects
Commit d59c59f4 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

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
parent fbb42b2e
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment