Skip to content

Commit 30c42bb

Browse files
committed
Add preprocessor check for GHC version before using isEvidenceContext. Updated related comment.
1 parent 488f23d commit 30c42bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: ghcide/src/Development/IDE/Spans/AtPoint.hs

+5-1
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,14 @@ atPoint IdeOptions{} (HAR _ hf _ _ kind) (DKMap dm km) env pos = listToMaybe $ p
227227
wrapHaskell x = "\n```haskell\n"<>x<>"\n```\n"
228228
info = nodeInfoH kind ast
229229
names = M.assocs $ nodeIdentifiers info
230-
-- Check if a name matches a pattern for a generated Core variable.
230+
-- Check for evidence bindings
231231
isInternal :: (Identifier, IdentifierDetails a) -> Bool
232232
isInternal (Right _, dets) =
233+
#if MIN_VERSION_ghc(9,0,1)
233234
any isEvidenceContext $ identInfo dets
235+
#else
236+
False
237+
#endif
234238
isInternal (Left _, _) = False
235239
filteredNames = filter (not . isInternal) names
236240
types = nodeType info

0 commit comments

Comments
 (0)