@@ -872,9 +872,9 @@ defineEarlyCutoff
872872 :: IdeRule k v
873873 => RuleBody k v
874874 -> 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
876876 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
878878 defineEarlyCutoff' False key file old mode $ second (mempty ,) <$> op key file
879879
880880defineNoFile :: IdeRule k v => (k -> Action v ) -> Rules ()
@@ -917,7 +917,8 @@ defineEarlyCutoff' doDiagnostics key file old mode action = do
917917 Nothing -> do
918918 (bs, (diags, res)) <- actionCatch
919919 (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 ))
921922 modTime <- liftIO $ (currentValue . fst =<< ) <$> getValues state GetModificationTime file
922923 (bs, res) <- case res of
923924 Nothing -> do
@@ -949,9 +950,10 @@ defineEarlyCutoff' doDiagnostics key file old mode action = do
949950 liftIO $ atomicModifyIORef'_ dirtyKeys (HSet. delete $ toKey key file)
950951 return res
951952
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"
955957
956958-- | Rule type, input file
957959data QDisk k = QDisk k NormalizedFilePath
0 commit comments