From: simonmar Date: Mon, 29 Nov 2004 11:32:38 +0000 (+0000) Subject: [project @ 2004-11-29 11:32:38 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1388 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=20ededd653ebd6a1662bce0d37b0a2a4f688a6ab;p=ghc-hetmet.git [project @ 2004-11-29 11:32:38 by simonmar] Look for package modules before home modules. This fixes the build in ghc/lib when bootstrapping with the HEAD. --- diff --git a/ghc/compiler/main/Finder.lhs b/ghc/compiler/main/Finder.lhs index c255408..033c503 100644 --- a/ghc/compiler/main/Finder.lhs +++ b/ghc/compiler/main/Finder.lhs @@ -102,16 +102,17 @@ findModule = cached findModule' findModule' :: DynFlags -> Module -> Bool -> IO FindResult findModule' dflags name explicit = do - j <- maybeHomeModule dflags name - case j of - NotFound home_files -> do - r <- findPackageModule' dflags name explicit - case r of - NotFound pkg_files - -> return (NotFound (home_files ++ pkg_files)) + r <- findPackageModule' dflags name explicit + case r of + NotFound pkg_files -> do + j <- maybeHomeModule dflags name + case j of + NotFound home_files -> + return (NotFound (home_files ++ pkg_files)) other_result -> return other_result - other_result -> return other_result + other_result + -> return other_result cached fn dflags name explicit = do m <- lookupFinderCache name