diff options
author | Artyom Kuznetsov <hi@wzrd.ht> | 2020-09-17 22:39:46 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-19 15:52:21 -0400 |
commit | 760307cf5511d970dfddf7fa4b502b4e3394b197 (patch) | |
tree | 590f7190e5bae306aa60893324cada2eddd51296 /testsuite/tests/polykinds | |
parent | b26cd86795d86850bfa97aa020d0a46b8ac043da (diff) | |
download | haskell-760307cf5511d970dfddf7fa4b502b4e3394b197.tar.gz |
Remove GADT self-reference check (#11554, #12081, #12174, fixes #15942)
Reverts 430f5c84dac1eab550110d543831a70516b5cac8
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r-- | testsuite/tests/polykinds/T11554.hs | 15 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T11554.stderr | 7 | ||||
-rw-r--r-- | testsuite/tests/polykinds/all.T | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/testsuite/tests/polykinds/T11554.hs b/testsuite/tests/polykinds/T11554.hs index bca6b8277c..0f26bcf330 100644 --- a/testsuite/tests/polykinds/T11554.hs +++ b/testsuite/tests/polykinds/T11554.hs @@ -1,10 +1,17 @@ -{-# LANGUAGE GADTs, PolyKinds, RankNTypes #-} +{-# LANGUAGE GADTs, PolyKinds, RankNTypes, TypeApplications, DataKinds #-} module T11554 where import Data.Kind -data P (x :: k) = Q +data P1 (x :: k) = Q1 +data A1 :: Type where + B1 :: forall (a :: A1). P1 a -> A1 -data A :: Type where - B :: forall (a :: A). P a -> A +data P2 k (x :: k) = Q2 +data A2 :: Type where + B2 :: P2 A2 a -> A2 + +data P3 (x :: k) = Q3 +data A3 :: Type where + B3 :: P3 @A3 a -> A3 diff --git a/testsuite/tests/polykinds/T11554.stderr b/testsuite/tests/polykinds/T11554.stderr deleted file mode 100644 index e3045c8366..0000000000 --- a/testsuite/tests/polykinds/T11554.stderr +++ /dev/null @@ -1,7 +0,0 @@ - -T11554.hs:10:21: error: - • Type constructor ‘A’ cannot be used here - (it is defined and used in the same recursive group) - • In the kind ‘A’ - In the definition of data constructor ‘B’ - In the data declaration for ‘A’ diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 68bf260e64..1ff66e63ab 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -148,7 +148,7 @@ test('KindVType', normal, compile_fail, ['']) test('T11821', normal, compile, ['']) test('T11821a', normal, compile_fail, ['']) test('T11640', normal, compile, ['']) -test('T11554', normal, compile_fail, ['']) +test('T11554', normal, compile, ['']) test('T12055', normal, compile, ['']) test('T12055a', normal, compile_fail, ['']) test('T12593', normal, compile_fail, ['']) |