+ found <- findOnPath home_path hs
+ case found of {
+ -- special case to avoid getting "./foo.hs" all the time
+ Just "." -> mkHomeModuleLocn mod_name basename (Just hs);
+ Just path -> mkHomeModuleLocn mod_name
+ (path ++ '/':basename) (Just (path ++ '/':hs));
+ Nothing -> do
+
+ found <- findOnPath home_path lhs
+ case found of {
+ -- special case to avoid getting "./foo.hs" all the time
+ Just "." -> mkHomeModuleLocn mod_name basename (Just lhs);
+ Just path -> mkHomeModuleLocn mod_name
+ (path ++ '/':basename) (Just (path ++ '/':lhs));
+ Nothing -> do
+
+ -- can't find a source file anywhere, check for a lone .hi file.
+ hisuf <- readIORef v_Hi_suf
+ let hi = basename ++ '.':hisuf
+ found <- findOnPath home_path hi
+ case found of {
+ Just path -> mkHiOnlyModuleLocn mod_name hi;
+ Nothing -> do