Skip to content

Commit c983727

Browse files
committed
fix 9.2.8
1 parent 554102d commit c983727

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ defineEarlyCutoff' doDiagnostics cmp key file mbOld mode action = do
12001200
Just (v@(Succeeded _ x), diags) -> do
12011201
ver <- estimateFileVersionUnsafely key (Just x) file
12021202
doDiagnostics (vfsVersion =<< ver) $ Vector.toList diags
1203-
return $ Just $ RunResult ChangedNothing old (A v) mempty
1203+
return $ Just $ RunResult ChangedNothing old (A v) $ return ()
12041204
_ -> return Nothing
12051205
_ ->
12061206
-- assert that a "clean" rule is never a cache miss

hls-graph/src/Development/IDE/Graph/Internal/Types.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ data RunResult value = RunResult
204204
,runValue :: value
205205
-- ^ The value to return from 'Development.Shake.Rule.apply'.
206206
,runHook :: STM ()
207-
-- ^ The value to return from 'Development.Shake.Rule.apply'.
207+
-- ^ The hook to run after the rule completes.
208208
} deriving Functor
209209

210210
---------------------------------------------------------------------

hls-graph/test/ActionSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ spec = do
8787
ruleUnit
8888
addRule $ \Rule _old _mode -> do
8989
[()] <- applyWithoutDependency [Rule]
90-
return $ RunResult ChangedRecomputeDiff "" True mempty
90+
return $ RunResult ChangedRecomputeDiff "" True $ return ()
9191

9292
let theKey = Rule @Bool
9393
res <- shakeRunDatabase db $

hls-graph/test/DatabaseSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ spec = do
2020
ruleBool
2121
addRule $ \Rule _old _mode -> do
2222
True <- apply1 (Rule @Bool)
23-
return $ RunResult ChangedRecomputeDiff "" () mempty
23+
return $ RunResult ChangedRecomputeDiff "" () (return ())
2424
let res = shakeRunDatabase db $ pure $ apply1 (Rule @())
2525
timeout 1 res `shouldThrow` \StackException{} -> True

hls-graph/test/Example.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ type instance RuleResult (Rule a) = a
2222

2323
ruleUnit :: Rules ()
2424
ruleUnit = addRule $ \(Rule :: Rule ()) _old _mode -> do
25-
return $ RunResult ChangedRecomputeDiff "" () mempty
25+
return $ RunResult ChangedRecomputeDiff "" () (return ())
2626

2727
-- | Depends on Rule @()
2828
ruleBool :: Rules ()
2929
ruleBool = addRule $ \Rule _old _mode -> do
3030
() <- apply1 Rule
31-
return $ RunResult ChangedRecomputeDiff "" True mempty
31+
return $ RunResult ChangedRecomputeDiff "" True (return ())
3232

3333

3434
data CondRule = CondRule
@@ -39,7 +39,7 @@ type instance RuleResult CondRule = Bool
3939
ruleCond :: C.MVar Bool -> Rules ()
4040
ruleCond mv = addRule $ \CondRule _old _mode -> do
4141
r <- liftIO $ C.modifyMVar mv $ \x -> return (not x, x)
42-
return $ RunResult ChangedRecomputeDiff "" r mempty
42+
return $ RunResult ChangedRecomputeDiff "" r (return ())
4343

4444
data BranchedRule = BranchedRule
4545
deriving (Eq, Generic, Hashable, NFData, Show, Typeable)
@@ -50,9 +50,9 @@ ruleWithCond = addRule $ \BranchedRule _old _mode -> do
5050
r <- apply1 CondRule
5151
if r then do
5252
_ <- apply1 SubBranchRule
53-
return $ RunResult ChangedRecomputeDiff "" (1 :: Int) mempty
53+
return $ RunResult ChangedRecomputeDiff "" (1 :: Int) (return ())
5454
else
55-
return $ RunResult ChangedRecomputeDiff "" (2 :: Int) mempty
55+
return $ RunResult ChangedRecomputeDiff "" (2 :: Int) (return ())
5656

5757
data SubBranchRule = SubBranchRule
5858
deriving (Eq, Generic, Hashable, NFData, Show, Typeable)
@@ -61,4 +61,4 @@ type instance RuleResult SubBranchRule = Int
6161
ruleSubBranch :: C.MVar Int -> Rules ()
6262
ruleSubBranch mv = addRule $ \SubBranchRule _old _mode -> do
6363
r <- liftIO $ C.modifyMVar mv $ \x -> return (x+1, x)
64-
return $ RunResult ChangedRecomputeDiff "" r mempty
64+
return $ RunResult ChangedRecomputeDiff "" r (return ())

0 commit comments

Comments
 (0)