From 955983e246b9c0fd1ec04f07d8507405cb3042f6 Mon Sep 17 00:00:00 2001 From: Dominic Orchard Date: Fri, 20 Sep 2024 16:47:42 +0100 Subject: [PATCH] remember to normalise and localise filenames --- src/Language/Fortran/Util/ModFile.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Language/Fortran/Util/ModFile.hs b/src/Language/Fortran/Util/ModFile.hs index d11c262f..f496a2a6 100644 --- a/src/Language/Fortran/Util/ModFile.hs +++ b/src/Language/Fortran/Util/ModFile.hs @@ -257,11 +257,12 @@ genUniqNameToFilenameMap :: FilePath -> ModFiles -> M.Map F.Name (String, Maybe genUniqNameToFilenameMap localPath m = M.unions . map perMF $ m where perMF mf = M.fromList - $ [ (n, (fname, Nothing)) + $ [ (n, (normalise $ localPath fname, Nothing)) | (_p, modEnv) <- M.toList localModuleMap , (n, _) <- M.elems modEnv ] -- decl map information - <> [(n, (fname, Just srcName)) | (n, (_dc, srcName, _)) <- M.toList declMap ] + <> [(n, (normalise $ localPath fname, Just srcName)) + | (n, (_dc, srcName, _)) <- M.toList declMap ] where -- Make sure that we remove imported declarations so we can