@@ -33,15 +33,14 @@ import Development.IDE (Action,
33
33
WithPriority ,
34
34
cmapWithPrio , define ,
35
35
fromNormalizedFilePath ,
36
- hieKind , use_ )
37
- import Development.IDE.Core.PluginUtils (runActionE ,
36
+ hieKind )
37
+ import Development.IDE.Core.PluginUtils (runActionE , useE ,
38
38
useWithStaleE )
39
39
import Development.IDE.Core.Rules (toIdeResult )
40
40
import Development.IDE.Core.RuleTypes (DocAndTyThingMap (.. ))
41
41
import Development.IDE.Core.Shake (ShakeExtras (.. ),
42
42
getShakeExtras ,
43
- getVirtualFile ,
44
- useWithStale_ )
43
+ getVirtualFile )
45
44
import Development.IDE.GHC.Compat hiding (Warning )
46
45
import Development.IDE.GHC.Compat.Util (mkFastString )
47
46
import Ide.Logger (logWith )
@@ -124,8 +123,8 @@ semanticTokensFullDelta recorder state pid param = do
124
123
getSemanticTokensRule :: Recorder (WithPriority SemanticLog ) -> Rules ()
125
124
getSemanticTokensRule recorder =
126
125
define (cmapWithPrio LogShake recorder) $ \ GetSemanticTokens nfp -> handleError recorder $ do
127
- (HAR {.. }) <- lift $ use_ GetHieAst nfp
128
- (DKMap {getTyThingMap}, _) <- lift $ useWithStale_ GetDocMap nfp
126
+ (HAR {.. }) <- withExceptT LogDependencyError $ useE GetHieAst nfp
127
+ (DKMap {getTyThingMap}, _) <- withExceptT LogDependencyError $ useWithStaleE GetDocMap nfp
129
128
ast <- handleMaybe (LogNoAST $ show nfp) $ getAsts hieAst M. !? (HiePath . mkFastString . fromNormalizedFilePath) nfp
130
129
virtualFile <- handleMaybeM LogNoVF $ getVirtualFile nfp
131
130
let hsFinder = idSemantic getTyThingMap (hieKindFunMasksKind hieKind) refMap
0 commit comments