Skip to content

Commit 8dd8349

Browse files
committed
hlints and comments
1 parent 6c84071 commit 8dd8349

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

ghcide/src/Development/IDE/Core/Compile.hs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ computePackageDeps env pkg = do
149149

150150
typecheckModule :: IdeDefer
151151
-> HscEnv
152-
-> (ModuleEnv UTCTime) -- ^ linkables not to unload
152+
-> ModuleEnv UTCTime -- ^ linkables not to unload
153153
-> ParsedModule
154154
-> IO (IdeResult TcModuleResult)
155155
typecheckModule (IdeDefer defer) hsc keep_lbls pm = do
@@ -300,7 +300,11 @@ captureSplicesAndDeps env k = do
300300
pure $ f aw'
301301

302302

303-
tcRnModule :: HscEnv -> ModuleEnv UTCTime -> ParsedModule -> IO TcModuleResult
303+
tcRnModule
304+
:: HscEnv
305+
-> ModuleEnv UTCTime -- ^ Program linkables not to unload
306+
-> ParsedModule
307+
-> IO TcModuleResult
304308
tcRnModule hsc_env keep_lbls pmod = do
305309
let ms = pm_mod_summary pmod
306310
hsc_env_tmp = hscSetFlags (ms_hspp_opts ms) hsc_env
@@ -331,6 +335,7 @@ tcRnModule hsc_env keep_lbls pmod = do
331335
| mod_info <- eltsUDFM $ udfmIntersectUFM hpt (getUniqSet new)]
332336

333337
-- The linkables we depend on at runtime are the transitive closure of 'mods'
338+
-- restricted to the home package
334339
mod_env = filterModuleEnv (\m _ -> elementOfUniqSet (moduleName m) mods_transitive) keep_lbls -- Could use restrictKeys if the constructors were exported
335340

336341
-- Serialize mod_env so we can read it from the interface
@@ -1128,7 +1133,7 @@ loadInterface session ms linkableNeeded RecompilationInfo{..} = do
11281133
Just (VFSVersion _) -> error "object code in vfs"
11291134

11301135
let do_regenerate _reason = withTrace "regenerate interface" $ \setTag -> do
1131-
setTag "Module" $ moduleNameString $ moduleName $ mod
1136+
setTag "Module" $ moduleNameString $ moduleName mod
11321137
setTag "Reason" $ showReason _reason
11331138
liftIO $ traceMarkerIO $ "regenerate interface " ++ show (moduleNameString $ moduleName mod, showReason _reason)
11341139
regenerate linkableNeeded

ghcide/src/Development/IDE/Core/Rules.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,7 @@ typeCheckRuleDefinition hsc pm = do
689689
currentLinkables :: Action (ModuleEnv UTCTime)
690690
currentLinkables = do
691691
compiledLinkables <- getCompiledLinkables <$> getIdeGlobalAction
692-
hm <- liftIO $ readVar compiledLinkables
693-
pure hm
692+
liftIO $ readVar compiledLinkables
694693

695694
loadGhcSession :: Recorder (WithPriority Log) -> GhcSessionDepsConfig -> Rules ()
696695
loadGhcSession recorder ghcSessionDepsConfig = do

0 commit comments

Comments
 (0)