From 42faeb3bf0a167ec4d449f27d8ca37501d96d24d Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 30 Oct 2018 10:49:59 -0400 Subject: 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. --- testsuite/tests/polykinds/T15592b.hs | 8 ++++++++ testsuite/tests/polykinds/T15592b.stderr | 7 +++++++ testsuite/tests/polykinds/all.T | 1 + 3 files changed, 16 insertions(+) create mode 100644 testsuite/tests/polykinds/T15592b.hs create mode 100644 testsuite/tests/polykinds/T15592b.stderr (limited to 'testsuite/tests/polykinds') 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, ['']) -- cgit v1.2.1