diff --git a/Cabal-syntax/src/Language/Haskell/Extension.hs b/Cabal-syntax/src/Language/Haskell/Extension.hs index 3fe8a60b381..d5fb797eea6 100644 --- a/Cabal-syntax/src/Language/Haskell/Extension.hs +++ b/Cabal-syntax/src/Language/Haskell/Extension.hs @@ -542,6 +542,9 @@ data KnownExtension RelaxedLayout | -- | Allow the use of type abstraction syntax. TypeAbstractions + | -- | Allow the use of built-in syntax for list, tuple and sum type constructors + -- rather than being exclusive to data constructors. + ListTuplePuns deriving (Generic, Show, Read, Eq, Ord, Enum, Bounded, Typeable, Data) instance Binary KnownExtension diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs index 1c571ad5b80..64fff30e0d1 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs @@ -33,15 +33,15 @@ md5Check proxy md5Int = structureHash proxy @?= md5FromInteger md5Int md5CheckGenericPackageDescription :: Proxy GenericPackageDescription -> Assertion md5CheckGenericPackageDescription proxy = md5Check proxy #if MIN_VERSION_base(4,19,0) - 0xbaf013a54a9ae4dab8d9c8beecb5ac5d + 0x4136daf844669c3c272845160cb5a908 #else - 0xcbd99e3b359decfab4b25e1335067f72 + 0x196b441722dfe556ed5b5d1d874741b3 #endif md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion md5CheckLocalBuildInfo proxy = md5Check proxy #if MIN_VERSION_base(4,19,0) - 0x403539e40a138deaf1a1189aa349cff2 + 0x8a30fa23374160aac9cdd1996dc5112b #else - 0x279674c69cfcfd5e8ffd51bc02965cd7 + 0x2e959a7f1da8f0d11f6923831ab6ab55 #endif diff --git a/changelog.d/pr-8854 b/changelog.d/pr-8854 new file mode 100644 index 00000000000..8b77d09d3ed --- /dev/null +++ b/changelog.d/pr-8854 @@ -0,0 +1,9 @@ +synopsis: Add language extension ListTuplePuns +packages: Cabal-syntax +prs: #8854 + +description: { + +- adds support for the `ListTuplePuns` language extension (GHC proposal #475) + +} diff --git a/editors/vim/syntax/cabal.vim b/editors/vim/syntax/cabal.vim index bb075d3f10d..210b637c14d 100644 --- a/editors/vim/syntax/cabal.vim +++ b/editors/vim/syntax/cabal.vim @@ -209,6 +209,7 @@ syn keyword cabalExtension contained \ LexicalNegation \ LiberalTypeSynonyms \ LinearTypes + \ ListTuplePuns \ RequiredTypeArguments \ MagicHash \ MonadComprehensions