We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3963421 commit 481acf4Copy full SHA for 481acf4
plugins/hls-haddock-comments-plugin/src/Ide/Plugin/HaddockComments/Data.hs
@@ -1,3 +1,4 @@
1
+{-# LANGUAGE CPP #-}
2
{-# LANGUAGE DuplicateRecordFields #-}
3
{-# LANGUAGE LambdaCase #-}
4
{-# LANGUAGE OverloadedStrings #-}
@@ -82,7 +83,12 @@ notSeperatedByLineEnding (L (RealSrcSpan x _) _) (L (RealSrcSpan y _) _) =
82
83
notSeperatedByLineEnding _ _ = False
84
85
emptyPriorHaddockComment :: Comment
-emptyPriorHaddockComment = mkComment "-- |" noSrcSpan
86
+emptyPriorHaddockComment = mkComment "-- |"
87
+#if MIN_VERSION_ghc(9,0,0)
88
+ badRealSrcSpan
89
+#else
90
+ noSrcSpan
91
+#endif
92
93
hasHaddock :: Data a => Anns -> Located a -> Maybe Bool
94
hasHaddock anns node = fmap annHasHaddock (anns Map.!? key)
0 commit comments