diff --git a/Cabal-syntax/src/Language/Haskell/Extension.hs b/Cabal-syntax/src/Language/Haskell/Extension.hs index 0559e8479dbf622845aed92a7ec3986aa8f4194b..3eecbe9a4c85af2290b6de8d5f0c7f699c07625f 100644 --- a/Cabal-syntax/src/Language/Haskell/Extension.hs +++ b/Cabal-syntax/src/Language/Haskell/Extension.hs @@ -165,6 +165,11 @@ data KnownExtension = -- | Enable the dreaded monomorphism restriction. | MonomorphismRestriction + -- | Enable deep subsumption, relaxing the simple subsumption rules, + -- implicitly inserting eta-expansions when matching up function types + -- with different quantification structures. + | DeepSubsumption + -- | Allow a specification attached to a multi-parameter type class -- which indicates that some parameters are entirely determined by -- others. The implementation will check that this property holds @@ -499,6 +504,9 @@ data KnownExtension = -- | Enable datatype promotion. | DataKinds + -- | Enable @type data@ declarations, defining constructors at the type level. + | TypeData + -- | Enable parallel arrays syntax (@[:@, @:]@) for /Data Parallel Haskell/. | ParallelArrays diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs index bbf5481da557bb50abd53ab35e32c6cf4f9edc88..5407eb1182a901787b049dbcaa5a9e304860cd1f 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs @@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured" -- The difference is in encoding of newtypes #if MIN_VERSION_base(4,7,0) , testCase "GenericPackageDescription" $ - md5Check (Proxy :: Proxy GenericPackageDescription) 0xaf3d4c667a8f019c98a45451419ad71c + md5Check (Proxy :: Proxy GenericPackageDescription) 0x227c04c63afe656449d6feb7220e5194 , testCase "LocalBuildInfo" $ - md5Check (Proxy :: Proxy LocalBuildInfo) 0x8ef5a39cb640e4340cf5c43a8300ff94 + md5Check (Proxy :: Proxy LocalBuildInfo) 0x4ec3f95ae75fea8422b1c5e15724f1a4 #endif ] diff --git a/changelog.d/pr-8493 b/changelog.d/pr-8493 new file mode 100644 index 0000000000000000000000000000000000000000..27344116e271ba68b5de8119701d7fb462a1e678 --- /dev/null +++ b/changelog.d/pr-8493 @@ -0,0 +1,11 @@ +synopsis: Add language extensions DeepSubsumption and TypeData +packages: Cabal-syntax +prs: #8493 +significance: significant + +description: { + +- adds support for the DeepSubsumption language extension (GHC proposal #511) +- adds support for the TypeData language extension (GHC proposal #106) + +} diff --git a/editors/vim/syntax/cabal.vim b/editors/vim/syntax/cabal.vim index 6a6929abe46ecba11533de949589e3ae53c16234..64a6b0420e0e3fbd1b93023ace80aec09019d5b9 100644 --- a/editors/vim/syntax/cabal.vim +++ b/editors/vim/syntax/cabal.vim @@ -160,6 +160,7 @@ syn keyword cabalExtension contained \ DataKinds \ DatatypeContexts \ DefaultSignatures + \ DeepSubsumption \ DeriveAnyClass \ DeriveDataTypeable \ DeriveFoldable @@ -266,6 +267,7 @@ syn keyword cabalExtension contained \ TransformListComp \ TupleSections \ TypeApplications + \ TypeData \ TypeFamilies \ TypeFamilyDependencies \ TypeInType