From e0bbb978c65090b995d29bb876d1a00515f6bd36 Mon Sep 17 00:00:00 2001 From: Brandon Chinn Date: Sat, 3 Aug 2024 10:45:04 -0700 Subject: [PATCH] Add MultilineStrings extension --- Cabal-syntax/src/Language/Haskell/Extension.hs | 2 ++ .../tests/UnitTests/Distribution/Utils/Structured.hs | 8 ++++---- changelog.d/pr-10245 | 8 ++++++++ editors/vim/syntax/cabal.vim | 1 + 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 changelog.d/pr-10245 diff --git a/Cabal-syntax/src/Language/Haskell/Extension.hs b/Cabal-syntax/src/Language/Haskell/Extension.hs index 22082d6d0b3..13796c80666 100644 --- a/Cabal-syntax/src/Language/Haskell/Extension.hs +++ b/Cabal-syntax/src/Language/Haskell/Extension.hs @@ -551,6 +551,8 @@ 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 + MultilineStrings 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 40770290073..d932ef59a33 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs @@ -31,15 +31,15 @@ md5Check proxy md5Int = structureHash proxy @?= md5FromInteger md5Int md5CheckGenericPackageDescription :: Proxy GenericPackageDescription -> Assertion md5CheckGenericPackageDescription proxy = md5Check proxy #if MIN_VERSION_base(4,19,0) - 0x3da8883a286b8fbfd9f94790d57cc06e + 0x62ad178a75f041af29947c9b3d83e6ed #else - 0x245e544da05f50f9dd0339a96ac99860 + 0xba8f0baa8074fd238ad36a309399349e #endif md5CheckLocalBuildInfo :: Proxy LocalBuildInfo -> Assertion md5CheckLocalBuildInfo proxy = md5Check proxy #if MIN_VERSION_base(4,19,0) - 0x7683c2daece12ba7982e80f860454f47 + 0xc68e9c0758c4bf2d72fe82b3d55cee34 #else - 0xe694b39b10bc861f47ea9c7b926a422a + 0xcf7e7bbcaec504d745fe086eec1786ff #endif diff --git a/changelog.d/pr-10245 b/changelog.d/pr-10245 new file mode 100644 index 00000000000..2ed3690720a --- /dev/null +++ b/changelog.d/pr-10245 @@ -0,0 +1,8 @@ +synopsis: Add MultilineStrings extension +packages: Cabal-syntax +prs: #10245 +description: { + +- adds support for the `MultilineStrings` language extension (GHC proposal #637) + +} diff --git a/editors/vim/syntax/cabal.vim b/editors/vim/syntax/cabal.vim index d3374dbd27f..db08e8e0d92 100644 --- a/editors/vim/syntax/cabal.vim +++ b/editors/vim/syntax/cabal.vim @@ -219,6 +219,7 @@ syn keyword cabalExtension contained \ MonoLocalBinds \ MonoPatBinds \ MonomorphismRestriction + \ MultilineStrings \ MultiParamTypeClasses \ MultiWayIf \ NPlusKPatterns