on master help sign in
Remove writeIfacesAndHie (#112)

This function is never used in ghcide so it makes more sense to have it be part of the `daml` source code since we depend on this for building the `.dar` archives.

commit79301b472e1140bf89e9f88985112494ce371d99 authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org> dateMon 23 Sep 2019, 12:55 (7 years ago) parentc24ef1c
1 file changed−34
src/Development/IDE/Core/Rules.hs−34
src/Development/IDE/Core/Rules.hs−34
@@ -23,7 +23,6 @@ module Development.IDE.Core.Rules(
2323 getDependencies,
2424 getParsedModule,
2525 fileFromParsedModule,
26− writeIfacesAndHie,
2726 ) where
2827
2928import Control.Monad.Except
@@ -128,39 +127,6 @@ getDefinition file pos = fmap join $ runMaybeT $ do
128127getParsedModule :: NormalizedFilePath -> Action (Maybe ParsedModule)
129128getParsedModule file = use GetParsedModule file
130129
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−
164130------------------------------------------------------------
165131-- Rules
166132-- These typically go from key to value and are oracles.