From 48bafff12ed5658b08c74c529c4c0b747c3968e9 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Sun, 22 Apr 2012 17:54:51 +0100 Subject: [PATCH] Test Trac #6020 --- testsuite/tests/polykinds/T6020.hs | 17 +++++++++++++++++ testsuite/tests/polykinds/all.T | 1 + 2 files changed, 18 insertions(+) create mode 100644 testsuite/tests/polykinds/T6020.hs diff --git a/testsuite/tests/polykinds/T6020.hs b/testsuite/tests/polykinds/T6020.hs new file mode 100644 index 0000000000..fa7de49030 --- /dev/null +++ b/testsuite/tests/polykinds/T6020.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE DataKinds, FunctionalDependencies, FlexibleInstances, + UndecidableInstances, PolyKinds, KindSignatures, + ConstraintKinds, FlexibleContexts #-} +module T6020 where + +import GHC.Prim (Constraint) + +class Id (a :: k) (b :: k) | a -> b +instance Id a a + +class Test (x :: a) (y :: a) | x -> y +instance (Id x y, Id y z) => Test x z + +test :: Test True True => () +test = () + +foo = test diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 3676c8de4d..fee495d5b5 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -33,3 +33,4 @@ test('T5937', normal, compile, ['']) test('T5935', normal, compile, ['']) test('T5938', normal, compile, ['']) test('T5948', normal, compile, ['']) +test('T6020', normal, compile, ['']) -- GitLab