From 3b77b3866485d8ea1da8f759e0383ade2f15a52c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Bla=C5=BEevi=C4=87?= Date: Fri, 23 Feb 2024 21:18:44 -0500 Subject: [PATCH 1/3] Registered the NamedDefaults language extension --- Cabal-syntax/src/Language/Haskell/Extension.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cabal-syntax/src/Language/Haskell/Extension.hs b/Cabal-syntax/src/Language/Haskell/Extension.hs index 448b1d777c7..22082d6d0b3 100644 --- a/Cabal-syntax/src/Language/Haskell/Extension.hs +++ b/Cabal-syntax/src/Language/Haskell/Extension.hs @@ -303,6 +303,9 @@ data KnownExtension | -- | Allow default instantiation of polymorphic types in more -- situations. ExtendedDefaultRules + | -- | Allow @default@ declarations to explicitly name the class and + -- be exported. + NamedDefaults | -- | Enable unboxed tuples. UnboxedTuples | -- | Enable @deriving@ for classes 'Data.Typeable.Typeable' and From 021b6a30cbeeb349e6edc7d11b0509dbbf443af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Bla=C5=BEevi=C4=87?= Date: Sat, 9 Mar 2024 08:20:47 -0500 Subject: [PATCH 2/3] Added changelog and Vim configuration lines --- changelog.d/pr-9740 | 9 +++++++++ editors/vim/syntax/cabal.vim | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 changelog.d/pr-9740 diff --git a/changelog.d/pr-9740 b/changelog.d/pr-9740 new file mode 100644 index 00000000000..c5a3b9a173e --- /dev/null +++ b/changelog.d/pr-9740 @@ -0,0 +1,9 @@ +synopsis: Add language extension NamedDefaults +packages: Cabal-syntax +prs: #9740 + +description: { + +- adds support for the `NamedDefaults` language extension (GHC proposal #409) + +} diff --git a/editors/vim/syntax/cabal.vim b/editors/vim/syntax/cabal.vim index 2e6361ba9cc..119a5ccb767 100644 --- a/editors/vim/syntax/cabal.vim +++ b/editors/vim/syntax/cabal.vim @@ -221,6 +221,7 @@ syn keyword cabalExtension contained \ MultiParamTypeClasses \ MultiWayIf \ NPlusKPatterns + \ NamedDefaults \ NamedFieldPuns \ NamedWildCards \ NegativeLiterals @@ -362,6 +363,7 @@ syn keyword cabalExtension contained \ NoMultiParamTypeClasses \ NoMultiWayIf \ NoNPlusKPatterns + \ NoNamedDefaults \ NoNamedFieldPuns \ NoNamedWildCards \ NoNegativeLiterals From 9c0d5046a0a066ed6a975092bce6920db9609b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Bla=C5=BEevi=C4=87?= Date: Fri, 5 Apr 2024 14:10:12 -0400 Subject: [PATCH 3/3] Updated the expected hashes --- .../tests/UnitTests/Distribution/Utils/Structured.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs index 71653353f9f..2bc8e206666 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) - 0x5a48c6570cbcf96af4c51f38962e37b5 + 0x6639f65b143830a97e9c4f448b9cabb0 #else - 0xc5c0e54b95e651216e92db04c9cd4ecf + 0x855933700dccfbcc1d642e3470c3702c #endif md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion md5CheckLocalBuildInfo proxy = md5Check proxy #if MIN_VERSION_base(4,19,0) - 0x6d668de33d7b4d5df3830e65e6941373 + 0x2ae73730f60c7c947e2cb63c4aac1e54 #else - 0xcdf740970a7d37e5e7ca48ea5f4f25eb7 + 0x906cbfdef0bcdfe5734499cfabc615f5 #endif