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