Skip to content

Commit

Permalink
[#104] Support PolymorphicComponents as language pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-christiansen committed Dec 16, 2024
1 parent 6b7fcbb commit 9963a51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Extensions/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ readExtension = \case
"RecordPuns" -> Nothing
#endif
"Rank2Types" -> Just RankNTypes
"PolymorphicComponents" -> Just RankNTypes
"CPP" -> Just Cpp
"Cpp" -> Nothing
s -> readMaybe s
Expand Down
3 changes: 3 additions & 0 deletions test/Test/Extensions/Module.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ onlyExtensionsSpec = describe "Parsing only extensions without anything else" $
itShouldParseOnOff
"{-# LANGUAGE NondecreasingIndentation #-}"
[On NondecreasingIndentation]
itShouldParseOnOff
"{-# LANGUAGE PolymorphicComponents #-}"
[On RankNTypes]
itShouldParse "{-#language TypeApplications#-}" [TypeApplications]
itShouldParse "{-# LANGUAGE TypeApplications, LambdaCase#-}" [TypeApplications, LambdaCase]
itShouldParse "{-# LANGUAGE TypeApplications , LambdaCase #-}" [TypeApplications, LambdaCase]
Expand Down

0 comments on commit 9963a51

Please sign in to comment.