From eb32f344e3c0259cbd98c6384850d1f085d91219 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Thu, 26 Apr 2012 09:28:45 +0100 Subject: Test Trac #6020 again, and #6044 --- testsuite/tests/polykinds/T6020a.hs | 16 ++++++++++++++++ testsuite/tests/polykinds/T6044.hs | 6 ++++++ testsuite/tests/polykinds/all.T | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 testsuite/tests/polykinds/T6020a.hs create mode 100644 testsuite/tests/polykinds/T6044.hs (limited to 'testsuite/tests/polykinds') diff --git a/testsuite/tests/polykinds/T6020a.hs b/testsuite/tests/polykinds/T6020a.hs new file mode 100644 index 0000000000..00689786c3 --- /dev/null +++ b/testsuite/tests/polykinds/T6020a.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE DataKinds, FunctionalDependencies, FlexibleInstances, + UndecidableInstances, PolyKinds, KindSignatures, + ConstraintKinds, FlexibleContexts, GADTs #-} + +module T6020a where + +class Id (a :: k) (b :: k) | b -> a +instance a ~ b => Id a b + +class Test (x :: a) (y :: a) +instance (Id x y, Id y z) => Test x z + +test :: Test True True => () +test = () + + diff --git a/testsuite/tests/polykinds/T6044.hs b/testsuite/tests/polykinds/T6044.hs new file mode 100644 index 0000000000..dd35be9017 --- /dev/null +++ b/testsuite/tests/polykinds/T6044.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, KindSignatures #-} + +module T6044 where + +type family Foo (a :: k) :: Maybe k +type instance Foo a = Just a diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 92f6414ac4..5f136b16b9 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -41,3 +41,5 @@ test('T6025', normal, run_command, ['$MAKE -s --no-print-directory T6025']) test('T6002', normal, compile, ['']) test('T6039', normal, compile_fail, ['']) test('T6021', normal, compile_fail, ['']) +test('T6020a', normal, compile, ['']) +test('T6044', normal, compile, ['']) -- cgit v1.2.1