@@ -233,7 +233,12 @@ runGhcSession IdeOptions{..} modu env act = runGhcEnv env $ do
233moduleImportPaths :: GHC.ParsedModule -> Maybe FilePath
233moduleImportPaths :: GHC.ParsedModule -> Maybe FilePath
234moduleImportPaths pm
234moduleImportPaths pm
235 | rootModDir == "." = Just rootPathDir
235 | rootModDir == "." = Just rootPathDir
236− | otherwise = dropTrailingPathSeparator <$> stripSuffix rootModDir rootPathDir
236+ | otherwise =
237+ -- TODO (MK) stripSuffix (normalise rootModDir) (normalise rootPathDir)
238+ -- would be a better choice but at the moment we do not consistently
239+ -- normalize file paths in the Shake graph so we can end up with the
240+ -- same module being represented twice in the Shake graph.
241+ Just $ dropTrailingPathSeparator $ dropEnd (length rootModDir) rootPathDir
238 ms = GHC.pm_mod_summary pm
243 ms = GHC.pm_mod_summary pm
239 file = GHC.ms_hspp_file ms
244 file = GHC.ms_hspp_file ms