summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2023-01-09 21:45:15 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-11 00:58:03 -0500
commitbc1257750f507218059ac6bad05d9c96a8b88d67 (patch)
tree25890b5ab5dc528f0907816d1d0e1a4895011378 /testsuite/tests
parent5f17e21af6368ec0e615af7de714a3194181f46a (diff)
downloadhaskell-bc1257750f507218059ac6bad05d9c96a8b88d67.tar.gz
Introduce the TypeAbstractions language flag
GHC Proposals #448 "Modern scoped type variables" and #425 "Invisible binders in type declarations" introduce a new language extension flag: TypeAbstractions. Part of the functionality guarded by this flag has already been implemented, namely type abstractions in constructor patterns, but it was guarded by a combination of TypeApplications and ScopedTypeVariables instead of a dedicated language extension flag. This patch does the following: * introduces a new language extension flag TypeAbstractions * requires TypeAbstractions for @a-syntax in constructor patterns instead of TypeApplications and ScopedTypeVariables * creates a User's Guide page for TypeAbstractions and moves the "Type Applications in Patterns" section there To avoid a breaking change, the new flag is implied by ScopedTypeVariables and is retroactively added to GHC2021. Metric Decrease: MultiLayerModulesTH_OneShot
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/driver/T4437.hs2
-rw-r--r--testsuite/tests/showIface/DocsInHiFile1.stdout1
-rw-r--r--testsuite/tests/showIface/DocsInHiFileTH.stdout1
-rw-r--r--testsuite/tests/showIface/HaddockIssue849.stdout1
-rw-r--r--testsuite/tests/showIface/HaddockOpts.stdout1
-rw-r--r--testsuite/tests/showIface/MagicHashInHaddocks.stdout1
-rw-r--r--testsuite/tests/showIface/NoExportList.stdout1
-rw-r--r--testsuite/tests/showIface/PragmaDocs.stdout1
-rw-r--r--testsuite/tests/showIface/ReExports.stdout1
-rw-r--r--testsuite/tests/typecheck/should_compile/T20443a.hs2
-rw-r--r--testsuite/tests/typecheck/should_fail/T19109.stderr2
11 files changed, 11 insertions, 3 deletions
diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs
index c895c8da6a..3c07aa5679 100644
--- a/testsuite/tests/driver/T4437.hs
+++ b/testsuite/tests/driver/T4437.hs
@@ -37,7 +37,7 @@ check title expected got
-- See Note [Adding a language extension] in compiler/GHC/Driver/Session.hs.
expectedGhcOnlyExtensions :: [String]
expectedGhcOnlyExtensions =
- [
+ [ "TypeAbstractions"
]
expectedCabalOnlyExtensions :: [String]
diff --git a/testsuite/tests/showIface/DocsInHiFile1.stdout b/testsuite/tests/showIface/DocsInHiFile1.stdout
index 093d07614c..b74854d941 100644
--- a/testsuite/tests/showIface/DocsInHiFile1.stdout
+++ b/testsuite/tests/showIface/DocsInHiFile1.stdout
@@ -143,5 +143,6 @@ docs:
ImportQualifiedPost
StandaloneKindSignatures
FieldSelectors
+ TypeAbstractions
extensible fields:
diff --git a/testsuite/tests/showIface/DocsInHiFileTH.stdout b/testsuite/tests/showIface/DocsInHiFileTH.stdout
index 1eac242a68..57ec74c37d 100644
--- a/testsuite/tests/showIface/DocsInHiFileTH.stdout
+++ b/testsuite/tests/showIface/DocsInHiFileTH.stdout
@@ -286,5 +286,6 @@ docs:
ImportQualifiedPost
StandaloneKindSignatures
FieldSelectors
+ TypeAbstractions
extensible fields:
diff --git a/testsuite/tests/showIface/HaddockIssue849.stdout b/testsuite/tests/showIface/HaddockIssue849.stdout
index 197f83df62..3bd32adbcc 100644
--- a/testsuite/tests/showIface/HaddockIssue849.stdout
+++ b/testsuite/tests/showIface/HaddockIssue849.stdout
@@ -66,5 +66,6 @@ docs:
ImportQualifiedPost
StandaloneKindSignatures
FieldSelectors
+ TypeAbstractions
extensible fields:
diff --git a/testsuite/tests/showIface/HaddockOpts.stdout b/testsuite/tests/showIface/HaddockOpts.stdout
index 60a0535457..8af1142afe 100644
--- a/testsuite/tests/showIface/HaddockOpts.stdout
+++ b/testsuite/tests/showIface/HaddockOpts.stdout
@@ -58,5 +58,6 @@ docs:
ImportQualifiedPost
StandaloneKindSignatures
FieldSelectors
+ TypeAbstractions
extensible fields:
diff --git a/testsuite/tests/showIface/MagicHashInHaddocks.stdout b/testsuite/tests/showIface/MagicHashInHaddocks.stdout
index 3b3d44f08d..2eb7eee959 100644
--- a/testsuite/tests/showIface/MagicHashInHaddocks.stdout
+++ b/testsuite/tests/showIface/MagicHashInHaddocks.stdout
@@ -68,5 +68,6 @@ docs:
ImportQualifiedPost
StandaloneKindSignatures
FieldSelectors
+ TypeAbstractions
extensible fields:
diff --git a/testsuite/tests/showIface/NoExportList.stdout b/testsuite/tests/showIface/NoExportList.stdout
index 3fec2d6c88..669774d8e4 100644
--- a/testsuite/tests/showIface/NoExportList.stdout
+++ b/testsuite/tests/showIface/NoExportList.stdout
@@ -94,5 +94,6 @@ docs:
ImportQualifiedPost
StandaloneKindSignatures
FieldSelectors
+ TypeAbstractions
extensible fields:
diff --git a/testsuite/tests/showIface/PragmaDocs.stdout b/testsuite/tests/showIface/PragmaDocs.stdout
index bd8ba16957..b2a9c929c6 100644
--- a/testsuite/tests/showIface/PragmaDocs.stdout
+++ b/testsuite/tests/showIface/PragmaDocs.stdout
@@ -68,5 +68,6 @@ docs:
ImportQualifiedPost
StandaloneKindSignatures
FieldSelectors
+ TypeAbstractions
extensible fields:
diff --git a/testsuite/tests/showIface/ReExports.stdout b/testsuite/tests/showIface/ReExports.stdout
index 31007df259..f0c1ab2c9f 100644
--- a/testsuite/tests/showIface/ReExports.stdout
+++ b/testsuite/tests/showIface/ReExports.stdout
@@ -65,5 +65,6 @@ docs:
ImportQualifiedPost
StandaloneKindSignatures
FieldSelectors
+ TypeAbstractions
extensible fields:
diff --git a/testsuite/tests/typecheck/should_compile/T20443a.hs b/testsuite/tests/typecheck/should_compile/T20443a.hs
index c4b552a3f2..539c0cd2f2 100644
--- a/testsuite/tests/typecheck/should_compile/T20443a.hs
+++ b/testsuite/tests/typecheck/should_compile/T20443a.hs
@@ -10,4 +10,4 @@ a :: () -> Proxy Int
a () = Proxy @Int
b :: Proxy Int -> ()
-b (Proxy @Int) = () -- This should compile, but doesn't
+b (Proxy @Int) = ()
diff --git a/testsuite/tests/typecheck/should_fail/T19109.stderr b/testsuite/tests/typecheck/should_fail/T19109.stderr
index 83f60680da..de40685f67 100644
--- a/testsuite/tests/typecheck/should_fail/T19109.stderr
+++ b/testsuite/tests/typecheck/should_fail/T19109.stderr
@@ -1,4 +1,4 @@
T19109.hs:6:4: error:
Illegal visible type application in a pattern: ‘@Int’
- Both ScopedTypeVariables and TypeApplications are required to use this feature
+ Perhaps you intended to use TypeAbstractions