@@ -155,33 +155,14 @@ newHscEnvEqWithImportPaths envImportPaths recorder se hscEnv deps = do
155
155
indexModuleHieFile hieDir modIface = do
156
156
let hiePath :: NormalizedFilePath
157
157
hiePath = toNormalizedFilePath' $
158
- hieDir </> toFilePath (moduleName $ mi_module modIface) ++ " .hie"
158
+ hieDir </> moduleNameSlashes (moduleName $ mi_module modIface) ++ " .hie"
159
159
hieCheck <- checkHieFile recorder se " newHscEnvEqWithImportPaths" hiePath
160
160
case hieCheck of
161
161
HieFileMissing -> return ()
162
162
HieAlreadyIndexed -> return ()
163
163
CouldNotLoadHie _e -> return ()
164
164
DoIndexing hash hie ->
165
165
indexHieFile se hiePath (FakeFile Nothing ) hash hie
166
- toFilePath :: ModuleName -> FilePath
167
- toFilePath = separateDirectories . prettyModuleName
168
- where
169
- separateDirectories :: FilePath -> FilePath
170
- separateDirectories moduleNameString =
171
- case breakOnDot moduleNameString of
172
- [] -> " "
173
- ms -> foldr1 (</>) ms
174
- breakOnDot :: FilePath -> [FilePath ]
175
- breakOnDot = words . map replaceDotWithSpace
176
- replaceDotWithSpace :: Char -> Char
177
- replaceDotWithSpace ' .' = ' '
178
- replaceDotWithSpace c = c
179
- prettyModuleName :: ModuleName -> String
180
- prettyModuleName = filter (/= ' "' )
181
- . concat
182
- . drop 1
183
- . words
184
- . show
185
166
loadModIface :: Module -> IO (Maybe ModIface )
186
167
loadModIface m = do
187
168
modIface <- initIfaceLoad hscEnv $
0 commit comments