[commit: ghc] master: Add second test case for #15592 (42faeb3)

git at git.haskell.org git at git.haskell.org
Tue Oct 30 14:51:44 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/42faeb3bf0a167ec4d449f27d8ca37501d96d24d/ghc

>---------------------------------------------------------------

commit 42faeb3bf0a167ec4d449f27d8ca37501d96d24d
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Tue Oct 30 10:49:59 2018 -0400

    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.


>---------------------------------------------------------------

42faeb3bf0a167ec4d449f27d8ca37501d96d24d
 testsuite/tests/polykinds/T15592b.hs                              | 8 ++++++++
 .../should_compile/T15743.stderr => polykinds/T15592b.stderr}     | 5 +++--
 testsuite/tests/polykinds/all.T                                   | 1 +
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/testsuite/tests/polykinds/T15592b.hs b/testsuite/tests/polykinds/T15592b.hs
new file mode 100644
index 0000000..43671e5
--- /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/dependent/should_compile/T15743.stderr b/testsuite/tests/polykinds/T15592b.stderr
similarity index 50%
copy from testsuite/tests/dependent/should_compile/T15743.stderr
copy to testsuite/tests/polykinds/T15592b.stderr
index 7162a87..c51416f 100644
--- a/testsuite/tests/dependent/should_compile/T15743.stderr
+++ b/testsuite/tests/polykinds/T15592b.stderr
@@ -1,6 +1,7 @@
 TYPE CONSTRUCTORS
-  type role T nominal nominal nominal phantom phantom phantom
-  T :: forall {k1} k2 (k3 :: k2). Proxy k3 -> k1 -> k2 -> *
+  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 371fbf2..6ffb318 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, [''])



More information about the ghc-commits mailing list