summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-10-30 10:49:59 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2018-10-30 10:50:01 -0400
commit42faeb3bf0a167ec4d449f27d8ca37501d96d24d (patch)
treea3769966494a0b0a587fb732fec10c3f151c54de /testsuite/tests/polykinds
parent849d3848f6a43c36eb0fffe45894be947ad66bfc (diff)
downloadhaskell-42faeb3bf0a167ec4d449f27d8ca37501d96d24d.tar.gz
Add second test case for #15592
This adds a program from https://ghc.haskell.org/trac/ghc/ticket/15592#comment:9 (which briefly refused to typecheck on GHC HEAD) as a test case.
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r--testsuite/tests/polykinds/T15592b.hs8
-rw-r--r--testsuite/tests/polykinds/T15592b.stderr7
-rw-r--r--testsuite/tests/polykinds/all.T1
3 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T15592b.hs b/testsuite/tests/polykinds/T15592b.hs
new file mode 100644
index 0000000000..43671e5441
--- /dev/null
+++ b/testsuite/tests/polykinds/T15592b.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE TypeFamilies #-}
+module T15592b where
+
+import Data.Kind
+
+class C a where
+ type T (x :: (f :: k -> Type) a)
diff --git a/testsuite/tests/polykinds/T15592b.stderr b/testsuite/tests/polykinds/T15592b.stderr
new file mode 100644
index 0000000000..c51416f4c5
--- /dev/null
+++ b/testsuite/tests/polykinds/T15592b.stderr
@@ -0,0 +1,7 @@
+TYPE CONSTRUCTORS
+ C :: forall {k}. k -> Constraint
+ type role T nominal nominal nominal nominal
+ T :: forall {k} (a :: k) (f :: k -> *). f a -> *
+Dependent modules: []
+Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3,
+ integer-gmp-1.0.2.0]
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 371fbf249a..6ffb3181ce 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -194,4 +194,5 @@ test('T15170', normal, compile, [''])
test('T14939', normal, compile, ['-O'])
test('T15577', normal, compile_fail, ['-O'])
test('T15592', normal, compile, [''])
+test('T15592b', normal, compile, ['-ddump-types -fprint-explicit-foralls'])
test('T15787', normal, compile_fail, [''])