Skip to content

Commit f13a189

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: Artem Pelenitsyn <[email protected]> * add DeepSubsumption as suggesterd by Artem Pelenitsyn * update MD5sums Co-authored-by: Artem Pelenitsyn <[email protected]>
1 parent 83c5a47 commit f13a189

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

Cabal-syntax/src/Language/Haskell/Extension.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ data KnownExtension =
165165
-- | Enable the dreaded monomorphism restriction.
166166
| MonomorphismRestriction
167167

168+
-- | Enable deep subsumption, relaxing the simple subsumption rules,
169+
-- implicitly inserting eta-expansions when matching up function types
170+
-- with different quantification structures.
171+
| DeepSubsumption
172+
168173
-- | Allow a specification attached to a multi-parameter type class
169174
-- which indicates that some parameters are entirely determined by
170175
-- others. The implementation will check that this property holds
@@ -499,6 +504,9 @@ data KnownExtension =
499504
-- | Enable datatype promotion.
500505
| DataKinds
501506

507+
-- | Enable @type data@ declarations, defining constructors at the type level.
508+
| TypeData
509+
502510
-- | Enable parallel arrays syntax (@[:@, @:]@) for /Data Parallel Haskell/.
503511
| ParallelArrays
504512

Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured"
2727
-- The difference is in encoding of newtypes
2828
#if MIN_VERSION_base(4,7,0)
2929
, testCase "GenericPackageDescription" $
30-
md5Check (Proxy :: Proxy GenericPackageDescription) 0xaf3d4c667a8f019c98a45451419ad71c
30+
md5Check (Proxy :: Proxy GenericPackageDescription) 0x227c04c63afe656449d6feb7220e5194
3131
, testCase "LocalBuildInfo" $
32-
md5Check (Proxy :: Proxy LocalBuildInfo) 0x8ef5a39cb640e4340cf5c43a8300ff94
32+
md5Check (Proxy :: Proxy LocalBuildInfo) 0x4ec3f95ae75fea8422b1c5e15724f1a4
3333
#endif
3434
]
3535

changelog.d/pr-8493

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
synopsis: Add language extensions DeepSubsumption and TypeData
2+
packages: Cabal-syntax
3+
prs: #8493
4+
significance: significant
5+
6+
description: {
7+
8+
- adds support for the DeepSubsumption language extension (GHC proposal #511)
9+
- adds support for the TypeData language extension (GHC proposal #106)
10+
11+
}

editors/vim/syntax/cabal.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ syn keyword cabalExtension contained
160160
\ DataKinds
161161
\ DatatypeContexts
162162
\ DefaultSignatures
163+
\ DeepSubsumption
163164
\ DeriveAnyClass
164165
\ DeriveDataTypeable
165166
\ DeriveFoldable
@@ -266,6 +267,7 @@ syn keyword cabalExtension contained
266267
\ TransformListComp
267268
\ TupleSections
268269
\ TypeApplications
270+
\ TypeData
269271
\ TypeFamilies
270272
\ TypeFamilyDependencies
271273
\ TypeInType

0 commit comments

Comments
 (0)