summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2020-07-30 10:22:48 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-02 16:44:11 -0400
commit226417424b2b578fd3c5424588367cb24e7720eb (patch)
tree031e3f130324e1b24ee863bf1aaef471698ce2f7 /testsuite
parente30fed6c6de1f881ce313900274294a793e42677 (diff)
downloadhaskell-226417424b2b578fd3c5424588367cb24e7720eb.tar.gz
Remove ConDeclGADTPrefixPs
This removes the `ConDeclGADTPrefixPs` per the discussion in #18517. Most of this patch simply removes code, although the code in the `rnConDecl` case for `ConDeclGADTPrefixPs` had to be moved around a bit: * The nested `forall`s check now lives in the `rnConDecl` case for `ConDeclGADT`. * The `LinearTypes`-specific code that used to live in the `rnConDecl` case for `ConDeclGADTPrefixPs` now lives in `GHC.Parser.PostProcess.mkGadtDecl`, which is now monadic so that it can check if `-XLinearTypes` is enabled. Fixes #18157.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr276
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr89
-rw-r--r--testsuite/tests/parser/should_compile/T15323.stderr113
3 files changed, 251 insertions, 227 deletions
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
index 863015241f..118500cdeb 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
@@ -372,31 +372,35 @@
(Nothing)
(Nothing)
[({ T17544.hs:25:5-18 }
- (XConDecl
- (ConDeclGADTPrefixPs
- [({ T17544.hs:25:5-8 }
- (Unqual
- {OccName: MkD5}))]
- (HsIB
+ (ConDeclGADT
+ (NoExtField)
+ [({ T17544.hs:25:5-8 }
+ (Unqual
+ {OccName: MkD5}))]
+ ({ T17544.hs:25:13-18 }
+ (False))
+ []
+ (Nothing)
+ (PrefixCon
+ [])
+ ({ T17544.hs:25:13-18 }
+ (HsAppTy
(NoExtField)
- ({ T17544.hs:25:13-18 }
- (HsAppTy
+ ({ T17544.hs:25:13-14 }
+ (HsTyVar
(NoExtField)
+ (NotPromoted)
({ T17544.hs:25:13-14 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:25:13-14 }
- (Unqual
- {OccName: D5}))))
+ (Unqual
+ {OccName: D5}))))
+ ({ T17544.hs:25:16-18 }
+ (HsTyVar
+ (NoExtField)
+ (NotPromoted)
({ T17544.hs:25:16-18 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:25:16-18 }
- (Unqual
- {OccName: Int})))))))
- (Nothing))))]
+ (Unqual
+ {OccName: Int}))))))
+ (Nothing)))]
({ <no location info> }
[]))))))]
(Nothing)))))
@@ -504,31 +508,35 @@
(Nothing)
(Nothing)
[({ T17544.hs:31:5-18 }
- (XConDecl
- (ConDeclGADTPrefixPs
- [({ T17544.hs:31:5-8 }
- (Unqual
- {OccName: MkD6}))]
- (HsIB
+ (ConDeclGADT
+ (NoExtField)
+ [({ T17544.hs:31:5-8 }
+ (Unqual
+ {OccName: MkD6}))]
+ ({ T17544.hs:31:13-18 }
+ (False))
+ []
+ (Nothing)
+ (PrefixCon
+ [])
+ ({ T17544.hs:31:13-18 }
+ (HsAppTy
(NoExtField)
- ({ T17544.hs:31:13-18 }
- (HsAppTy
+ ({ T17544.hs:31:13-14 }
+ (HsTyVar
(NoExtField)
+ (NotPromoted)
({ T17544.hs:31:13-14 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:31:13-14 }
- (Unqual
- {OccName: D6}))))
+ (Unqual
+ {OccName: D6}))))
+ ({ T17544.hs:31:16-18 }
+ (HsTyVar
+ (NoExtField)
+ (NotPromoted)
({ T17544.hs:31:16-18 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:31:16-18 }
- (Unqual
- {OccName: Int})))))))
- (Nothing))))]
+ (Unqual
+ {OccName: Int}))))))
+ (Nothing)))]
({ <no location info> }
[]))))))]
(Nothing)))))
@@ -636,31 +644,35 @@
(Nothing)
(Nothing)
[({ T17544.hs:37:5-18 }
- (XConDecl
- (ConDeclGADTPrefixPs
- [({ T17544.hs:37:5-8 }
- (Unqual
- {OccName: MkD7}))]
- (HsIB
+ (ConDeclGADT
+ (NoExtField)
+ [({ T17544.hs:37:5-8 }
+ (Unqual
+ {OccName: MkD7}))]
+ ({ T17544.hs:37:13-18 }
+ (False))
+ []
+ (Nothing)
+ (PrefixCon
+ [])
+ ({ T17544.hs:37:13-18 }
+ (HsAppTy
(NoExtField)
- ({ T17544.hs:37:13-18 }
- (HsAppTy
+ ({ T17544.hs:37:13-14 }
+ (HsTyVar
(NoExtField)
+ (NotPromoted)
({ T17544.hs:37:13-14 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:37:13-14 }
- (Unqual
- {OccName: D7}))))
+ (Unqual
+ {OccName: D7}))))
+ ({ T17544.hs:37:16-18 }
+ (HsTyVar
+ (NoExtField)
+ (NotPromoted)
({ T17544.hs:37:16-18 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:37:16-18 }
- (Unqual
- {OccName: Int})))))))
- (Nothing))))]
+ (Unqual
+ {OccName: Int}))))))
+ (Nothing)))]
({ <no location info> }
[]))))))]
(Nothing)))))
@@ -768,31 +780,35 @@
(Nothing)
(Nothing)
[({ T17544.hs:43:5-18 }
- (XConDecl
- (ConDeclGADTPrefixPs
- [({ T17544.hs:43:5-8 }
- (Unqual
- {OccName: MkD8}))]
- (HsIB
+ (ConDeclGADT
+ (NoExtField)
+ [({ T17544.hs:43:5-8 }
+ (Unqual
+ {OccName: MkD8}))]
+ ({ T17544.hs:43:13-18 }
+ (False))
+ []
+ (Nothing)
+ (PrefixCon
+ [])
+ ({ T17544.hs:43:13-18 }
+ (HsAppTy
(NoExtField)
- ({ T17544.hs:43:13-18 }
- (HsAppTy
+ ({ T17544.hs:43:13-14 }
+ (HsTyVar
(NoExtField)
+ (NotPromoted)
({ T17544.hs:43:13-14 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:43:13-14 }
- (Unqual
- {OccName: D8}))))
+ (Unqual
+ {OccName: D8}))))
+ ({ T17544.hs:43:16-18 }
+ (HsTyVar
+ (NoExtField)
+ (NotPromoted)
({ T17544.hs:43:16-18 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:43:16-18 }
- (Unqual
- {OccName: Int})))))))
- (Nothing))))]
+ (Unqual
+ {OccName: Int}))))))
+ (Nothing)))]
({ <no location info> }
[]))))))]
(Nothing)))))
@@ -900,31 +916,35 @@
(Nothing)
(Nothing)
[({ T17544.hs:49:5-18 }
- (XConDecl
- (ConDeclGADTPrefixPs
- [({ T17544.hs:49:5-8 }
- (Unqual
- {OccName: MkD9}))]
- (HsIB
+ (ConDeclGADT
+ (NoExtField)
+ [({ T17544.hs:49:5-8 }
+ (Unqual
+ {OccName: MkD9}))]
+ ({ T17544.hs:49:13-18 }
+ (False))
+ []
+ (Nothing)
+ (PrefixCon
+ [])
+ ({ T17544.hs:49:13-18 }
+ (HsAppTy
(NoExtField)
- ({ T17544.hs:49:13-18 }
- (HsAppTy
+ ({ T17544.hs:49:13-14 }
+ (HsTyVar
(NoExtField)
+ (NotPromoted)
({ T17544.hs:49:13-14 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:49:13-14 }
- (Unqual
- {OccName: D9}))))
+ (Unqual
+ {OccName: D9}))))
+ ({ T17544.hs:49:16-18 }
+ (HsTyVar
+ (NoExtField)
+ (NotPromoted)
({ T17544.hs:49:16-18 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:49:16-18 }
- (Unqual
- {OccName: Int})))))))
- (Nothing))))]
+ (Unqual
+ {OccName: Int}))))))
+ (Nothing)))]
({ <no location info> }
[]))))))]
(Nothing)))))
@@ -1032,31 +1052,35 @@
(Nothing)
(Nothing)
[({ T17544.hs:55:5-20 }
- (XConDecl
- (ConDeclGADTPrefixPs
- [({ T17544.hs:55:5-9 }
- (Unqual
- {OccName: MkD10}))]
- (HsIB
+ (ConDeclGADT
+ (NoExtField)
+ [({ T17544.hs:55:5-9 }
+ (Unqual
+ {OccName: MkD10}))]
+ ({ T17544.hs:55:14-20 }
+ (False))
+ []
+ (Nothing)
+ (PrefixCon
+ [])
+ ({ T17544.hs:55:14-20 }
+ (HsAppTy
(NoExtField)
- ({ T17544.hs:55:14-20 }
- (HsAppTy
+ ({ T17544.hs:55:14-16 }
+ (HsTyVar
(NoExtField)
+ (NotPromoted)
({ T17544.hs:55:14-16 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:55:14-16 }
- (Unqual
- {OccName: D10}))))
+ (Unqual
+ {OccName: D10}))))
+ ({ T17544.hs:55:18-20 }
+ (HsTyVar
+ (NoExtField)
+ (NotPromoted)
({ T17544.hs:55:18-20 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544.hs:55:18-20 }
- (Unqual
- {OccName: Int})))))))
- (Nothing))))]
+ (Unqual
+ {OccName: Int}))))))
+ (Nothing)))]
({ <no location info> }
[]))))))]
(Nothing)))))
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
index 9d45b6a86d..146b686357 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
@@ -30,24 +30,28 @@
(Nothing)
(Nothing)
[({ T17544_kw.hs:16:9-20 }
- (XConDecl
- (ConDeclGADTPrefixPs
- [({ T17544_kw.hs:16:9-13 }
- (Unqual
- {OccName: MkFoo}))]
- (HsIB
+ (ConDeclGADT
+ (NoExtField)
+ [({ T17544_kw.hs:16:9-13 }
+ (Unqual
+ {OccName: MkFoo}))]
+ ({ T17544_kw.hs:16:18-20 }
+ (False))
+ []
+ (Nothing)
+ (PrefixCon
+ [])
+ ({ T17544_kw.hs:16:18-20 }
+ (HsTyVar
(NoExtField)
+ (NotPromoted)
({ T17544_kw.hs:16:18-20 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544_kw.hs:16:18-20 }
- (Unqual
- {OccName: Foo})))))
- (Just
- ({ T17544_kw.hs:15:10-35 }
- (HsDocString
- " Bad comment for MkFoo"))))))]
+ (Unqual
+ {OccName: Foo}))))
+ (Just
+ ({ T17544_kw.hs:15:10-35 }
+ (HsDocString
+ " Bad comment for MkFoo")))))]
({ <no location info> }
[])))))
,({ T17544_kw.hs:(18,1)-(19,26) }
@@ -70,33 +74,34 @@
(Nothing)
(Nothing)
[({ T17544_kw.hs:19:9-26 }
- (XConDecl
- (ConDeclGADTPrefixPs
- [({ T17544_kw.hs:19:9-13 }
- (Unqual
- {OccName: MkBar}))]
- (HsIB
+ (ConDeclGADT
+ (NoExtField)
+ [({ T17544_kw.hs:19:9-13 }
+ (Unqual
+ {OccName: MkBar}))]
+ ({ T17544_kw.hs:19:18-26 }
+ (False))
+ []
+ (Nothing)
+ (PrefixCon
+ [(HsScaled
+ (HsLinearArrow)
+ ({ T17544_kw.hs:19:18-19 }
+ (HsTupleTy
+ (NoExtField)
+ (HsBoxedOrConstraintTuple)
+ [])))])
+ ({ T17544_kw.hs:19:24-26 }
+ (HsTyVar
(NoExtField)
- ({ T17544_kw.hs:19:18-26 }
- (HsFunTy
- (NoExtField)
- (HsUnrestrictedArrow)
- ({ T17544_kw.hs:19:18-19 }
- (HsTupleTy
- (NoExtField)
- (HsBoxedOrConstraintTuple)
- []))
- ({ T17544_kw.hs:19:24-26 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T17544_kw.hs:19:24-26 }
- (Unqual
- {OccName: Bar})))))))
- (Just
- ({ T17544_kw.hs:18:13-38 }
- (HsDocString
- " Bad comment for MkBar"))))))]
+ (NotPromoted)
+ ({ T17544_kw.hs:19:24-26 }
+ (Unqual
+ {OccName: Bar}))))
+ (Just
+ ({ T17544_kw.hs:18:13-38 }
+ (HsDocString
+ " Bad comment for MkBar")))))]
({ <no location info> }
[])))))
,({ T17544_kw.hs:(21,1)-(24,18) }
diff --git a/testsuite/tests/parser/should_compile/T15323.stderr b/testsuite/tests/parser/should_compile/T15323.stderr
index 7b8436f2cb..0e2734dd48 100644
--- a/testsuite/tests/parser/should_compile/T15323.stderr
+++ b/testsuite/tests/parser/should_compile/T15323.stderr
@@ -36,67 +36,62 @@
(Nothing)
(Nothing)
[({ T15323.hs:6:5-54 }
- (XConDecl
- (ConDeclGADTPrefixPs
- [({ T15323.hs:6:5-14 }
- (Unqual
- {OccName: TestParens}))]
- (HsIB
+ (ConDeclGADT
+ (NoExtField)
+ [({ T15323.hs:6:5-14 }
+ (Unqual
+ {OccName: TestParens}))]
+ ({ T15323.hs:6:20-54 }
+ (True))
+ [({ T15323.hs:6:27 }
+ (UserTyVar
+ (NoExtField)
+ (SpecifiedSpec)
+ ({ T15323.hs:6:27 }
+ (Unqual
+ {OccName: v}))))]
+ (Just
+ ({ T15323.hs:6:31-36 }
+ [({ T15323.hs:6:31-36 }
+ (HsParTy
+ (NoExtField)
+ ({ T15323.hs:6:32-35 }
+ (HsAppTy
+ (NoExtField)
+ ({ T15323.hs:6:32-33 }
+ (HsTyVar
+ (NoExtField)
+ (NotPromoted)
+ ({ T15323.hs:6:32-33 }
+ (Unqual
+ {OccName: Eq}))))
+ ({ T15323.hs:6:35 }
+ (HsTyVar
+ (NoExtField)
+ (NotPromoted)
+ ({ T15323.hs:6:35 }
+ (Unqual
+ {OccName: v}))))))))]))
+ (PrefixCon
+ [])
+ ({ T15323.hs:6:41-54 }
+ (HsAppTy
(NoExtField)
- ({ T15323.hs:6:20-54 }
- (HsForAllTy
+ ({ T15323.hs:6:41-52 }
+ (HsTyVar
(NoExtField)
- (HsForAllInvis
- (NoExtField)
- [({ T15323.hs:6:27 }
- (UserTyVar
- (NoExtField)
- (SpecifiedSpec)
- ({ T15323.hs:6:27 }
- (Unqual
- {OccName: v}))))])
- ({ T15323.hs:6:31-54 }
- (HsQualTy
- (NoExtField)
- ({ T15323.hs:6:31-36 }
- [({ T15323.hs:6:31-36 }
- (HsParTy
- (NoExtField)
- ({ T15323.hs:6:32-35 }
- (HsAppTy
- (NoExtField)
- ({ T15323.hs:6:32-33 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T15323.hs:6:32-33 }
- (Unqual
- {OccName: Eq}))))
- ({ T15323.hs:6:35 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T15323.hs:6:35 }
- (Unqual
- {OccName: v}))))))))])
- ({ T15323.hs:6:41-54 }
- (HsAppTy
- (NoExtField)
- ({ T15323.hs:6:41-52 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T15323.hs:6:41-52 }
- (Unqual
- {OccName: MaybeDefault}))))
- ({ T15323.hs:6:54 }
- (HsTyVar
- (NoExtField)
- (NotPromoted)
- ({ T15323.hs:6:54 }
- (Unqual
- {OccName: v})))))))))))
- (Nothing))))]
+ (NotPromoted)
+ ({ T15323.hs:6:41-52 }
+ (Unqual
+ {OccName: MaybeDefault}))))
+ ({ T15323.hs:6:54 }
+ (HsTyVar
+ (NoExtField)
+ (NotPromoted)
+ ({ T15323.hs:6:54 }
+ (Unqual
+ {OccName: v}))))))
+ (Nothing)))]
({ <no location info> }
[])))))]
(Nothing)