@@ -872,9 +872,9 @@ defineEarlyCutoff
872
872
:: IdeRule k v
873
873
=> RuleBody k v
874
874
-> Rules ()
875
- defineEarlyCutoff (Rule op) = addRule $ \ (Q (key, file)) (old :: Maybe BS. ByteString ) mode -> otTracedAction key file mode isSuccess $ do
875
+ defineEarlyCutoff (Rule op) = addRule $ \ (Q (key, file)) (old :: Maybe BS. ByteString ) mode -> otTracedAction key file mode traceA $ do
876
876
defineEarlyCutoff' True key file old mode $ op key file
877
- defineEarlyCutoff (RuleNoDiagnostics op) = addRule $ \ (Q (key, file)) (old :: Maybe BS. ByteString ) mode -> otTracedAction key file mode isSuccess $ do
877
+ defineEarlyCutoff (RuleNoDiagnostics op) = addRule $ \ (Q (key, file)) (old :: Maybe BS. ByteString ) mode -> otTracedAction key file mode traceA $ do
878
878
defineEarlyCutoff' False key file old mode $ second (mempty ,) <$> op key file
879
879
880
880
defineNoFile :: IdeRule k v => (k -> Action v ) -> Rules ()
@@ -917,7 +917,8 @@ defineEarlyCutoff' doDiagnostics key file old mode action = do
917
917
Nothing -> do
918
918
(bs, (diags, res)) <- actionCatch
919
919
(do v <- action; liftIO $ evaluate $ force v) $
920
- \ (e :: SomeException ) -> pure (Nothing , ([ideErrorText file $ T. pack $ show e | not $ isBadDependency e],Nothing ))
920
+ \ (e :: SomeException ) -> do
921
+ pure (Nothing , ([ideErrorText file $ T. pack $ show e | not $ isBadDependency e],Nothing ))
921
922
modTime <- liftIO $ (currentValue . fst =<< ) <$> getValues state GetModificationTime file
922
923
(bs, res) <- case res of
923
924
Nothing -> do
@@ -949,9 +950,10 @@ defineEarlyCutoff' doDiagnostics key file old mode action = do
949
950
liftIO $ atomicModifyIORef'_ dirtyKeys (HSet. delete $ toKey key file)
950
951
return res
951
952
952
- isSuccess :: A v -> Bool
953
- isSuccess (A Failed {}) = False
954
- isSuccess _ = True
953
+ traceA :: A v -> String
954
+ traceA (A Failed {}) = " Failed"
955
+ traceA (A Stale {}) = " Stale"
956
+ traceA (A Succeeded {}) = " Success"
955
957
956
958
-- | Rule type, input file
957
959
data QDisk k = QDisk k NormalizedFilePath
0 commit comments