@@ -33,15 +33,14 @@ import Development.IDE (Action,
3333 WithPriority ,
3434 cmapWithPrio , define ,
3535 fromNormalizedFilePath ,
36- hieKind , use_ )
37- import Development.IDE.Core.PluginUtils (runActionE ,
36+ hieKind )
37+ import Development.IDE.Core.PluginUtils (runActionE , useE ,
3838 useWithStaleE )
3939import Development.IDE.Core.Rules (toIdeResult )
4040import Development.IDE.Core.RuleTypes (DocAndTyThingMap (.. ))
4141import Development.IDE.Core.Shake (ShakeExtras (.. ),
4242 getShakeExtras ,
43- getVirtualFile ,
44- useWithStale_ )
43+ getVirtualFile )
4544import Development.IDE.GHC.Compat hiding (Warning )
4645import Development.IDE.GHC.Compat.Util (mkFastString )
4746import Ide.Logger (logWith )
@@ -124,8 +123,8 @@ semanticTokensFullDelta recorder state pid param = do
124123getSemanticTokensRule :: Recorder (WithPriority SemanticLog ) -> Rules ()
125124getSemanticTokensRule recorder =
126125 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
129128 ast <- handleMaybe (LogNoAST $ show nfp) $ getAsts hieAst M. !? (HiePath . mkFastString . fromNormalizedFilePath) nfp
130129 virtualFile <- handleMaybeM LogNoVF $ getVirtualFile nfp
131130 let hsFinder = idSemantic getTyThingMap (hieKindFunMasksKind hieKind) refMap
0 commit comments