Skip to content

Commit 66d401b

Browse files
ffaf1mergify[bot]
andauthored
Add OrPatterns extensions (#10339)
* Add OrPatterns extension * Add changelog * Add missing full stop * Add missing NoMultilineStrings in vim syntax file * Make test happy * Remove changelog entry We don't need it, changes have been manually incorporated in 3.14 release notes (#10338) --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent efa04f7 commit 66d401b

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Cabal-syntax/src/Language/Haskell/Extension.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,11 @@ data KnownExtension
551551
| -- | Allow the use of built-in syntax for list, tuple and sum type constructors
552552
-- rather than being exclusive to data constructors.
553553
ListTuplePuns
554-
| -- | Support multiline strings
554+
| -- | Support multiline strings.
555555
MultilineStrings
556+
| -- | Allow use of or-pattern syntax, condensing multiple patterns
557+
-- into a single one.
558+
OrPatterns
556559
deriving (Generic, Show, Read, Eq, Ord, Enum, Bounded, Typeable, Data)
557560

558561
instance Binary KnownExtension

Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ md5Check proxy md5Int = structureHash proxy @?= md5FromInteger md5Int
3030

3131
md5CheckGenericPackageDescription :: Proxy GenericPackageDescription -> Assertion
3232
md5CheckGenericPackageDescription proxy = md5Check proxy
33-
0xe40d8d67b85712f245354657d7a80165
33+
0x09251b46ffc5178a7526d31e794d9c62
3434

3535
md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion
3636
md5CheckLocalBuildInfo proxy = md5Check proxy
37-
0x94827844fdb1afedee525061749fb16f
37+
0x93b7e8ebb5b9f879fa5fe49b1708b43b

editors/vim/syntax/cabal.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ syn keyword cabalExtension contained
232232
\ NullaryTypeClasses
233233
\ NumDecimals
234234
\ NumericUnderscores
235+
\ OrPatterns
235236
\ OverlappingInstances
236237
\ OverloadedLabels
237238
\ OverloadedLists
@@ -362,6 +363,7 @@ syn keyword cabalExtension contained
362363
\ NoMonoLocalBinds
363364
\ NoMonoPatBinds
364365
\ NoMonomorphismRestriction
366+
\ NoMultilineStrings
365367
\ NoMultiParamTypeClasses
366368
\ NoMultiWayIf
367369
\ NoNPlusKPatterns
@@ -379,6 +381,7 @@ syn keyword cabalExtension contained
379381
\ NoOverloadedLists
380382
\ NoOverloadedRecordDot
381383
\ NoOverloadedStrings
384+
\ NoOrPatterns
382385
\ NoPackageImports
383386
\ NoParallelArrays
384387
\ NoParallelListComp

0 commit comments

Comments
 (0)