You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ghcide/src/Development/IDE/Core/Compile.hs
+69-1
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,15 @@ captureSplicesAndDeps env k = do
192
192
193
193
-- We want to record exactly which linkables/modules the typechecker needed at runtime
194
194
-- This is useful for recompilation checking.
195
-
-- From hscCompileCoreExpr'
195
+
-- See Note [Recompilation avoidance in the presence of TH]
196
+
--
197
+
-- From hscCompileCoreExpr' in GHC
198
+
-- To update, copy hscCompileCoreExpr' (the implementation of
199
+
-- hscCompileCoreExprHook) verbatim, and add code to extract all the free
200
+
-- names in the compiled bytecode, recording the modules that those names
201
+
-- come from in the IORef,, as these are the modules on whose implementation
202
+
-- we depend.
203
+
--
196
204
-- Only compute direct dependencies instead of transitive dependencies.
197
205
-- It is much cheaper to store the direct dependencies, we can compute
198
206
-- the transitive ones when required.
@@ -336,6 +344,7 @@ tcRnModule hsc_env keep_lbls pmod = do
336
344
337
345
-- The linkables we depend on at runtime are the transitive closure of 'mods'
338
346
-- restricted to the home package
347
+
-- See Note [Recompilation avoidance in the presence of TH]
339
348
mod_env = filterModuleEnv (\m _ -> elementOfUniqSet (moduleName m) mods_transitive) keep_lbls -- Could use restrictKeys if the constructors were exported
340
349
341
350
-- Serialize mod_env so we can read it from the interface
0 commit comments