Skip to content
Snippets Groups Projects
Unverified Commit f13a1896 authored by Ross Paterson's avatar Ross Paterson Committed by GitHub
Browse files

add DeepSubsumption and TypeData language extensions (ghc proposals 511 & 106) (#8493)


* add TypeData language extension (ghc proposal 106)

* changelog entry for PR 8493

* add TypeData to cabal.vim

* update MD5 hashes

* Update changelog.d/pr-8493

adjusted wording

Co-authored-by: default avatarArtem Pelenitsyn <a.pelenitsyn@gmail.com>

* add DeepSubsumption as suggesterd by Artem Pelenitsyn

* update MD5sums

Co-authored-by: default avatarArtem Pelenitsyn <a.pelenitsyn@gmail.com>
parent 83c5a472
No related branches found
No related tags found
No related merge requests found
...@@ -165,6 +165,11 @@ data KnownExtension = ...@@ -165,6 +165,11 @@ data KnownExtension =
-- | Enable the dreaded monomorphism restriction. -- | Enable the dreaded monomorphism restriction.
| MonomorphismRestriction | 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 -- | Allow a specification attached to a multi-parameter type class
-- which indicates that some parameters are entirely determined by -- which indicates that some parameters are entirely determined by
-- others. The implementation will check that this property holds -- others. The implementation will check that this property holds
...@@ -499,6 +504,9 @@ data KnownExtension = ...@@ -499,6 +504,9 @@ data KnownExtension =
-- | Enable datatype promotion. -- | Enable datatype promotion.
| DataKinds | DataKinds
-- | Enable @type data@ declarations, defining constructors at the type level.
| TypeData
-- | Enable parallel arrays syntax (@[:@, @:]@) for /Data Parallel Haskell/. -- | Enable parallel arrays syntax (@[:@, @:]@) for /Data Parallel Haskell/.
| ParallelArrays | ParallelArrays
......
...@@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured" ...@@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured"
-- The difference is in encoding of newtypes -- The difference is in encoding of newtypes
#if MIN_VERSION_base(4,7,0) #if MIN_VERSION_base(4,7,0)
, testCase "GenericPackageDescription" $ , testCase "GenericPackageDescription" $
md5Check (Proxy :: Proxy GenericPackageDescription) 0xaf3d4c667a8f019c98a45451419ad71c md5Check (Proxy :: Proxy GenericPackageDescription) 0x227c04c63afe656449d6feb7220e5194
, testCase "LocalBuildInfo" $ , testCase "LocalBuildInfo" $
md5Check (Proxy :: Proxy LocalBuildInfo) 0x8ef5a39cb640e4340cf5c43a8300ff94 md5Check (Proxy :: Proxy LocalBuildInfo) 0x4ec3f95ae75fea8422b1c5e15724f1a4
#endif #endif
] ]
......
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)
}
...@@ -160,6 +160,7 @@ syn keyword cabalExtension contained ...@@ -160,6 +160,7 @@ syn keyword cabalExtension contained
\ DataKinds \ DataKinds
\ DatatypeContexts \ DatatypeContexts
\ DefaultSignatures \ DefaultSignatures
\ DeepSubsumption
\ DeriveAnyClass \ DeriveAnyClass
\ DeriveDataTypeable \ DeriveDataTypeable
\ DeriveFoldable \ DeriveFoldable
...@@ -266,6 +267,7 @@ syn keyword cabalExtension contained ...@@ -266,6 +267,7 @@ syn keyword cabalExtension contained
\ TransformListComp \ TransformListComp
\ TupleSections \ TupleSections
\ TypeApplications \ TypeApplications
\ TypeData
\ TypeFamilies \ TypeFamilies
\ TypeFamilyDependencies \ TypeFamilyDependencies
\ TypeInType \ TypeInType
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment