on master help sign in
Cleanup moduleImportPaths now that file paths are normalized (#1980)
commit2ba7d08ed69d138eb1affc86fbbe4990485aaa6d authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org> dateWed 3 Jul 2019, 11:55 (7 years ago) parent27f547f
1 file changed+1−5
src/Development/IDE/Core/Compile.hs+1−5
src/Development/IDE/Core/Compile.hs+1−5
@@ -184,11 +184,7 @@ moduleImportPaths :: GHC.ParsedModule -> Maybe FilePath
184184moduleImportPaths pm
185185 | rootModDir == "." = Just rootPathDir
186186 | otherwise =
187− -- TODO (MK) stripSuffix (normalise rootModDir) (normalise rootPathDir)
188− -- would be a better choice but at the moment we do not consistently
189− -- normalize file paths in the Shake graph so we can end up with the
190− -- same module being represented twice in the Shake graph.
191− Just $ dropTrailingPathSeparator $ dropEnd (length rootModDir) rootPathDir
187+ dropTrailingPathSeparator <$> stripSuffix (normalise rootModDir) (normalise rootPathDir)
192188 where
193189 ms = GHC.pm_mod_summary pm
194190 file = GHC.ms_hspp_file ms