From: sof Date: Fri, 22 Aug 2003 16:38:51 +0000 (+0000) Subject: [project @ 2003-08-22 16:38:51 by sof] X-Git-Tag: Approx_11550_changesets_converted~527 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3c6b9911369deda84fcc74a31372e6f51e0cb054;hp=13ec31c00cdb714370077c8b0a3805452609315d;p=ghc-hetmet.git [project @ 2003-08-22 16:38:51 by sof] mkHomeModLocation: basename has to be equal to module name, not just suffix --- diff --git a/ghc/compiler/main/Finder.lhs b/ghc/compiler/main/Finder.lhs index d73cba3..adc33c7 100644 --- a/ghc/compiler/main/Finder.lhs +++ b/ghc/compiler/main/Finder.lhs @@ -281,10 +281,10 @@ mkHomeModLocation mod_name src_filename = do case maybePrefixMatch (reverse mod_basename) (reverse basename) of Just "" -> mkHomeModLocationSearched mod_name "." mod_basename extension - Just rest -> do + Just rest@(r:_) | isPathSeparator r -> do let path = reverse (dropWhile (=='/') rest) mkHomeModLocationSearched mod_name path mod_basename extension - Nothing -> do + _ -> do -- hPutStrLn stderr ("Warning: " ++ src_filename ++ -- ": filename and module name do not match") let (dir,basename,ext) = splitFilename3 src_filename