Skip to content

Commit

Permalink
Merge pull request #10360 from ffaf1/backport-3.14-extension
Browse files Browse the repository at this point in the history
Add OrPatterns extension (backport #10339)
  • Loading branch information
mergify[bot] authored Sep 16, 2024
2 parents 7829842 + a856656 commit a370e62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Cabal-syntax/src/Language/Haskell/Extension.hs
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,11 @@ data KnownExtension
| -- | Allow the use of built-in syntax for list, tuple and sum type constructors
-- rather than being exclusive to data constructors.
ListTuplePuns
| -- | Support multiline strings
| -- | Support multiline strings.
MultilineStrings
| -- | Allow use of or-pattern syntax, condensing multiple patterns
-- into a single one.
OrPatterns
deriving (Generic, Show, Read, Eq, Ord, Enum, Bounded, Typeable, Data)

instance Binary KnownExtension
Expand Down
4 changes: 2 additions & 2 deletions Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ md5Check proxy md5Int = structureHash proxy @?= md5FromInteger md5Int

md5CheckGenericPackageDescription :: Proxy GenericPackageDescription -> Assertion
md5CheckGenericPackageDescription proxy = md5Check proxy
0xe40d8d67b85712f245354657d7a80165
0x09251b46ffc5178a7526d31e794d9c62

md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion
md5CheckLocalBuildInfo proxy = md5Check proxy
0x94827844fdb1afedee525061749fb16f
0x93b7e8ebb5b9f879fa5fe49b1708b43b
3 changes: 3 additions & 0 deletions editors/vim/syntax/cabal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ syn keyword cabalExtension contained
\ NullaryTypeClasses
\ NumDecimals
\ NumericUnderscores
\ OrPatterns
\ OverlappingInstances
\ OverloadedLabels
\ OverloadedLists
Expand Down Expand Up @@ -362,6 +363,7 @@ syn keyword cabalExtension contained
\ NoMonoLocalBinds
\ NoMonoPatBinds
\ NoMonomorphismRestriction
\ NoMultilineStrings
\ NoMultiParamTypeClasses
\ NoMultiWayIf
\ NoNPlusKPatterns
Expand All @@ -379,6 +381,7 @@ syn keyword cabalExtension contained
\ NoOverloadedLists
\ NoOverloadedRecordDot
\ NoOverloadedStrings
\ NoOrPatterns
\ NoPackageImports
\ NoParallelArrays
\ NoParallelListComp
Expand Down

0 comments on commit a370e62

Please sign in to comment.