Skip to content

Commit

Permalink
remember to normalise and localise filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
dorchard committed Sep 20, 2024
1 parent f0c07b3 commit 955983e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Language/Fortran/Util/ModFile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 955983e

Please sign in to comment.