From 3c6b9911369deda84fcc74a31372e6f51e0cb054 Mon Sep 17 00:00:00 2001 From: sof Date: Fri, 22 Aug 2003 16:38:51 +0000 Subject: [PATCH] [project @ 2003-08-22 16:38:51 by sof] mkHomeModLocation: basename has to be equal to module name, not just suffix --- ghc/compiler/main/Finder.lhs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.10.4