@@ -517,10 +517,14 @@ mappingForVersion allMappings file (Just (VFSVersion ver)) = do
517
517
mappingForVersion _ _ _ = pure zeroMapping
518
518
519
519
type IdeRule k i is v =
520
- ( Shake. RuleResult k ~ v
521
- , Shake. ShakeValue k
520
+ ( IdeValueRule k v
522
521
, RuleInput k ~ is
523
522
, HasInput i is
523
+ )
524
+
525
+ type IdeValueRule k v =
526
+ ( Shake. RuleResult k ~ v
527
+ , Shake. ShakeValue k
524
528
, Show v
525
529
, Typeable v
526
530
, NFData v
@@ -1156,9 +1160,9 @@ usesWithStale key files = do
1156
1160
-- whether the rule succeeded or not.
1157
1161
traverse (lastValue key) files
1158
1162
1159
- useWithoutDependency :: IdeRule k i is v
1160
- => k -> InputPath i -> Action (Maybe v )
1161
- useWithoutDependency key ( InputPath file) =
1163
+ useWithoutDependency :: IdeValueRule k v
1164
+ => k -> NormalizedFilePath -> Action (Maybe v )
1165
+ useWithoutDependency key file =
1162
1166
(\ (Identity (A value)) -> currentValue value) <$> applyWithoutDependency (Identity (Q (key, file)))
1163
1167
1164
1168
data RuleBody k i v
@@ -1288,8 +1292,8 @@ defineEarlyCutoff' doDiagnostics cmp key file mbOld mode action = do
1288
1292
-> Maybe v
1289
1293
-> InputPath i
1290
1294
-> Action (Maybe FileVersion )
1291
- estimateFileVersionUnsafely _k v fp
1292
- | unInputPath fp == emptyFilePath = pure Nothing
1295
+ estimateFileVersionUnsafely _k v ( InputPath fp)
1296
+ | fp == emptyFilePath = pure Nothing
1293
1297
| Just Refl <- eqT @ k @ GetModificationTime = pure v
1294
1298
-- GetModificationTime depends on these rules, so avoid creating a cycle
1295
1299
| Just Refl <- eqT @ k @ AddWatchedFile = pure Nothing
0 commit comments