@@ -33,6 +33,7 @@ import Development.IDE.Core.RuleTypes (GhcSession (GhcSession),
33
33
GhcSessionDeps (GhcSessionDeps ),
34
34
GhcSessionIO (GhcSessionIO ))
35
35
import Development.IDE.Graph (Action , actionBracket )
36
+ import Development.IDE.Graph.Rule
36
37
import Development.IDE.Types.Location (Uri (.. ))
37
38
import Development.IDE.Types.Logger (Logger , logDebug , logInfo )
38
39
import Development.IDE.Types.Shake (Key (.. ), Value ,
@@ -77,21 +78,25 @@ otTracedAction
77
78
:: Show k
78
79
=> k -- ^ The Action's Key
79
80
-> NormalizedFilePath -- ^ Path to the file the action was run for
80
- -> (a -> Bool ) -- ^ Did this action succeed?
81
- -> Action a -- ^ The action
82
- -> Action a
83
- otTracedAction key file success act
81
+ -> RunMode
82
+ -> (a -> Bool )
83
+ -> Action (RunResult a ) -- ^ The action
84
+ -> Action (RunResult a )
85
+ otTracedAction key file mode success act
84
86
| userTracingEnabled =
85
87
actionBracket
86
88
(do
87
89
sp <- beginSpan (fromString (show key))
88
90
setTag sp " File" (fromString $ fromNormalizedFilePath file)
91
+ setTag sp " Mode" (fromString $ show mode)
89
92
return sp
90
93
)
91
94
endSpan
92
95
(\ sp -> do
93
96
res <- act
94
- unless (success res) $ setTag sp " error" " 1"
97
+ unless (success $ runValue res) $ setTag sp " error" " 1"
98
+ setTag sp " changed" $ case res of
99
+ RunResult x _ _ -> fromString $ show x
95
100
return res)
96
101
| otherwise = act
97
102
0 commit comments