Add second test case for #15592
authorRyan Scott <ryan.gl.scott@gmail.com>
Tue, 30 Oct 2018 14:49:59 +0000 (10:49 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Tue, 30 Oct 2018 14:50:01 +0000 (10:50 -0400)
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.

testsuite/tests/polykinds/T15592b.hs [new file with mode: 0644]
testsuite/tests/polykinds/T15592b.stderr [new file with mode: 0644]
testsuite/tests/polykinds/all.T

diff --git a/testsuite/tests/polykinds/T15592b.hs b/testsuite/tests/polykinds/T15592b.hs
new file mode 100644 (file)
index 0000000..43671e5
--- /dev/null
@@ -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 (file)
index 0000000..c51416f
--- /dev/null
@@ -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]
index 371fbf2..6ffb318 100644 (file)
@@ -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, [''])