@@ -22,6 +22,9 @@ import Agda.Syntax.Internal (alwaysUnblock)
2222import Agda.Syntax.Position (HasRange (getRange ), Range , noRange )
2323import Agda.Syntax.Scope.Base
2424import Agda.TypeChecking.Errors (getAllWarningsOfTCErr , prettyError )
25+ #if MIN_VERSION_Agda(2,6,3)
26+ import Agda.TypeChecking.Errors (explainWhyInScope )
27+ #endif
2528import Agda.TypeChecking.Monad hiding (Function )
2629import Agda.TypeChecking.Monad.MetaVars (withInteractionId )
2730import Agda.TypeChecking.Pretty (prettyTCM )
@@ -259,8 +262,8 @@ fromDisplayInfo = \case
259262 <+> text (List. intercalate " , " $ words names) $$ nest 2 (align 10 hitDocs)
260263 return $ IR. DisplayInfoGeneric " Search About" [Unlabeled (Render. text $ show doc) Nothing Nothing ]
261264#if MIN_VERSION_Agda(2,6,3)
262- Info_WhyInScope ( WhyInScopeData q cwd v xs ms) -> do
263- doc <- explainWhyInScope (prettyShow q) cwd v xs ms
265+ Info_WhyInScope why -> do
266+ doc <- explainWhyInScope why
264267#else
265268 Info_WhyInScope s cwd v xs ms -> do
266269 doc <- explainWhyInScope s cwd v xs ms
@@ -380,6 +383,7 @@ showInfoError (Info_HighlightingParseError ii) =
380383showInfoError (Info_HighlightingScopeCheckError ii) =
381384 return $ " Highlighting failed to scope check expression in " ++ show ii
382385
386+ #if !MIN_VERSION_Agda(2,6,3)
383387explainWhyInScope ::
384388 String ->
385389 FilePath ->
@@ -462,6 +466,7 @@ explainWhyInScope s _ v xs ms =
462466 TCP. <+> " at"
463467 TCP. <+> TCP. prettyTCM (getRange m)
464468 TCP. $$ pWhy r w
469+ #endif
465470
466471-- | Pretty-prints the context of the given meta-variable.
467472prettyResponseContexts ::
0 commit comments