X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FFinder.lhs;h=a5db92671d25264682a7389ae89184a53834a873;hb=c5d45a35695a91a552a180951c67355e3d3ef4e0;hp=c90bb0f3345e1f59ea9ef1226525df47a34287a0;hpb=d45e90d32431680206dcb51e0e055679b3d0745c;p=ghc-hetmet.git diff --git a/ghc/compiler/main/Finder.lhs b/ghc/compiler/main/Finder.lhs index c90bb0f..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 = - [ ("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