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 8e172fa commit a122f78Copy full SHA for a122f78
src/GHC/Util/ApiAnnotation.hs
@@ -5,6 +5,7 @@ module GHC.Util.ApiAnnotation (
5
, commentText
6
, GHC.Util.ApiAnnotation.comments
7
, isCommentMultiline
8
+ , isCommentPragma
9
, pragmas
10
, flags
11
, languagePragmas
@@ -61,6 +62,11 @@ isCommentMultiline :: LEpaComment -> Bool
61
62
isCommentMultiline (L _ (EpaComment (EpaBlockComment _) _)) = True
63
isCommentMultiline _ = False
64
65
+isCommentPragma :: LEpaComment -> Bool
66
+isCommentPragma (L _ (EpaComment (EpaBlockComment comm) _)) =
67
+ "{-#" `isPrefixOf` comm && "#-}" `isSuffixOf` comm
68
+isCommentPragma _ = False
69
+
70
-- Pragmas have the form @{-# ...#-}@.
71
pragmas :: EpAnnComments -> [(LEpaComment, String)]
72
pragmas x =
0 commit comments