- | name `elem` dfun_names = return ()
- | isWiredInName name = return () -- No checking for wired-in names. In particular,
- -- 'error' is handled by a rather gross hack
- -- (see comments in GHC.Err.hs-boot)
- | isImplicitTyThing boot_thing = return ()
- | Just real_thing <- lookupTypeEnv local_type_env name
- = do { checkTc (name `elemNameSet` local_export_set)
- (missingBootThing boot_thing "exported by")
+ | name `elem` dfun_names = return ()
+ | isWiredInName name = return () -- No checking for wired-in names. In particular,
+ -- 'error' is handled by a rather gross hack
+ -- (see comments in GHC.Err.hs-boot)
+
+ -- Check that the actual module exports the same thing
+ | not (name `elemNameSet` local_export_set)
+ = addErrTc (missingBootThing name "exported by")
+
+ -- If the boot module does not *define* the thing, we are done
+ -- (it simply re-exports it, and names match, so nothing further to do)
+ | isNothing mb_boot_thing = return ()