Skip to content

Commit f759a0d

Browse files
committed
ParseDecl: try parsing without StarIsType
1 parent 82f7b16 commit f759a0d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Input/ParseDecl.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ runGhcLibParser str
527527
runGhcLibParser str = case runGhcLibParserWithExtensions almostAllExtensions str of
528528
PFailed{}
529529
| '#' `elem` str -> runGhcLibParserWithExtensions noUnboxed str
530+
| '*' `elem` str -> runGhcLibParserWithExtensions noStarIsType str
530531
| "pattern" `isInfixOf` str -> runGhcLibParserWithExtensions noPatternSynonyms str
531532
res -> res
532533

@@ -556,6 +557,9 @@ noUnboxed =
556557
noPatternSynonyms :: EnumSet.EnumSet Extension
557558
noPatternSynonyms = EnumSet.delete PatternSynonyms almostAllExtensions
558559

560+
noStarIsType :: EnumSet.EnumSet Extension
561+
noStarIsType = EnumSet.delete StarIsType almostAllExtensions
562+
559563
runGhcLibParserWithExtensions ::
560564
EnumSet.EnumSet Extension ->
561565
String ->

0 commit comments

Comments
 (0)