@@ -23,7 +23,6 @@ module Development.IDE.Core.Rules(
23
23
getDependencies ,
24
24
getParsedModule ,
25
25
fileFromParsedModule ,
26
- writeIfacesAndHie ,
27
26
) where
28
27
29
28
import Control.Monad.Except
@@ -128,39 +127,6 @@ getDefinition file pos = fmap join $ runMaybeT $ do
128
127
getParsedModule :: NormalizedFilePath -> Action (Maybe ParsedModule )
129
128
getParsedModule file = use GetParsedModule file
130
129
131
- -- | Write interface files and hie files to the location specified by the given options.
132
- writeIfacesAndHie ::
133
- NormalizedFilePath -> [NormalizedFilePath ] -> Action (Maybe [NormalizedFilePath ])
134
- writeIfacesAndHie ifDir files =
135
- runMaybeT $ do
136
- tcms <- usesE TypeCheck files
137
- fmap concat $ forM (zip files tcms) $ \ (file, tcm) -> do
138
- session <- lift $ hscEnv <$> use_ GhcSession file
139
- liftIO $ writeTcm session tcm
140
- where
141
- writeTcm session tcm =
142
- do
143
- let fp =
144
- fromNormalizedFilePath ifDir </>
145
- (ms_hspp_file $
146
- pm_mod_summary $ tm_parsed_module $ tmrModule tcm)
147
- createDirectoryIfMissing True (takeDirectory fp)
148
- let ifaceFp = replaceExtension fp " .hi"
149
- let hieFp = replaceExtension fp " .hie"
150
- writeIfaceFile
151
- (hsc_dflags session)
152
- ifaceFp
153
- (hm_iface $ tmrModInfo tcm)
154
- hieFile <-
155
- liftIO $
156
- runHsc session $
157
- mkHieFile
158
- (pm_mod_summary $ tm_parsed_module $ tmrModule tcm)
159
- (fst $ tm_internals_ $ tmrModule tcm)
160
- (fromJust $ tm_renamed_source $ tmrModule tcm)
161
- writeHieFile hieFp hieFile
162
- pure [toNormalizedFilePath ifaceFp, toNormalizedFilePath hieFp]
163
-
164
130
------------------------------------------------------------
165
131
-- Rules
166
132
-- These typically go from key to value and are oracles.
0 commit comments