- ; case lookupType hpt (eps_PTE eps) name of
- Just thing -> return thing
- Nothing -> tcImportDecl name
- }}
+ ; case lookupType hpt (eps_PTE eps) name of {
+ Just thing -> return thing ;
+ Nothing -> do
+
+ -- Should it have been in the local envt?
+ { let mod = nameModule name
+ ; if mod == tcg_mod env || mod == thFAKE then
+ notFound name -- It should be local, so panic
+ -- The thFAKE possibility is because it
+ -- might be in a declaration bracket
+ else
+ tcImportDecl name -- Go find it in an interface
+ }}}}}