@@ -68,6 +68,12 @@ locateModule
68 -> m (Either [FileDiagnostic] Import)
68 -> m (Either [FileDiagnostic] Import)
69locateModule dflags exts doesExist modName mbPkgName isSource = do
69locateModule dflags exts doesExist modName mbPkgName isSource = do
70 case mbPkgName of
70 case mbPkgName of
71+ -- "this" means that we should only look in the current package
73+ mbFile <- locateModuleFile dflags exts doesExist isSource $ unLoc modName
75+ Nothing -> return $ Left $ notFoundErr dflags modName $ LookupNotFound []
76+ Just file -> return $ Right $ FileImport file
71 -- if a package name is given we only go look for a package
77 -- if a package name is given we only go look for a package
72 Just _pkgName -> lookupInPackageDB dflags
78 Just _pkgName -> lookupInPackageDB dflags
73 Nothing -> do
79 Nothing -> do