From: sof Date: Wed, 7 Nov 2001 22:51:08 +0000 (+0000) Subject: [project @ 2001-11-07 22:51:08 by sof] X-Git-Tag: Approximately_9120_patches~608 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=547643e7eee71268467246eac3eb84934fc4ec36;p=ghc-hetmet.git [project @ 2001-11-07 22:51:08 by sof] When generating dependencies, look for both source files _and_ interface files. If STABLE is still a branch with a future, I'd encourage merging. --- diff --git a/ghc/compiler/main/Finder.lhs b/ghc/compiler/main/Finder.lhs index d6e4c3c..a5db926 100644 --- a/ghc/compiler/main/Finder.lhs +++ b/ghc/compiler/main/Finder.lhs @@ -72,13 +72,19 @@ maybeHomeModule mod_name is_source = do -- In compilation manager modes, we look for source files in the home -- package because we can compile these automatically. In one-shot -- compilation mode we look for .hi files only. + -- + -- When generating dependencies, we're interested in either category. + -- + source_exts = + [ ("hs", \ _ fName path -> mkHomeModuleLocn mod_name path fName) + , ("lhs", \ _ fName path -> mkHomeModuleLocn mod_name path fName) + ] + hi_exts = [ (hisuf, \ _ fName path -> mkHiOnlyModuleLocn mod_name fName) ] + std_exts - | isCompManagerMode mode || mode == DoMkDependHS = - [ ("hs", \ _ fName path -> mkHomeModuleLocn mod_name path fName) - , ("lhs", \ _ fName path -> mkHomeModuleLocn mod_name path fName) - ] - | otherwise = - [ (hisuf, \ _ fName path -> mkHiOnlyModuleLocn mod_name fName) ] + | mode == DoMkDependHS = hi_exts ++ source_exts + | isCompManagerMode mode = source_exts + | otherwise = hi_exts -- last chance: .hi-boot- and .hi-boot hi_boot_ver = "hi-boot-" ++ cHscIfaceFileVersion