- -- the class, via C( op ). If the class was exported too we'd
- -- have C( C, op )
-
- -- The use of lookupOrigSub here (rather than lookupOrig)
- -- ensures that the subordinate names record their parent;
- -- and that in turn ensures that the GlobalRdrEnv
- -- has the correct parent for all the names in its range.
- -- For imported things, we may only suck in the interface later, if ever.
- -- Reason for all this:
- -- Suppose module M exports type A.T, and constructor A.MkT
- -- Then, we know that A.MkT is a subordinate name of A.T,
- -- even though we aren't at the binding site of A.T
- -- And it's important, because we may simply re-export A.T
- -- without ever sucking in the declaration itself.
-
-
-lookupOrig :: Module -> OccName -> TcRnIf a b Name
--- Even if we get a miss in the original-name cache, we
--- make a new External Name.
--- We fake up
--- SrcLoc to noSrcLoc
--- Parent no Nothing
--- They'll be overwritten, in due course, by LoadIface.loadDecl.
-lookupOrig mod occ = lookup_orig mod occ Nothing
-
-lookup_orig :: Module -> OccName -> Maybe Name -> TcRnIf a b Name
--- Used when we know the parent of the thing we are looking up
-lookup_orig mod occ mb_parent
+ -- the class, which shows up as C( op ) here. If the class was
+ -- exported too we'd have C( C, op )
+
+lookupOrig :: Module -> OccName -> TcRnIf a b Name
+lookupOrig mod occ