diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-08-18 14:50:57 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-08-18 14:51:19 +0100 |
commit | 61c42464d2f128403e2cd082b5c74f0dd7890452 (patch) | |
tree | e5d9071ed2f6bef345d3f79d02a9ee62b4675ab3 | |
parent | 4c6fcd7230e1d4d8e79c57823911a90d43ac7b32 (diff) | |
download | haskell-61c42464d2f128403e2cd082b5c74f0dd7890452.tar.gz |
Test Trac #14110
-rw-r--r-- | testsuite/tests/polykinds/T14110.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T14110.stderr | 5 | ||||
-rw-r--r-- | testsuite/tests/polykinds/all.T | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T14110.hs b/testsuite/tests/polykinds/T14110.hs new file mode 100644 index 0000000000..d2e8e71896 --- /dev/null +++ b/testsuite/tests/polykinds/T14110.hs @@ -0,0 +1,9 @@ +{-# Language TypeFamilies, ScopedTypeVariables, PolyKinds, DataKinds #-} + +import Data.Kind + +class R (c :: k -> Constraint) where + type R_ (c :: k -> Constraint) :: k -> Type + +instance R Eq where + type R_ Eq a = a -> a -> Bool diff --git a/testsuite/tests/polykinds/T14110.stderr b/testsuite/tests/polykinds/T14110.stderr new file mode 100644 index 0000000000..aedfacb324 --- /dev/null +++ b/testsuite/tests/polykinds/T14110.stderr @@ -0,0 +1,5 @@ + +T14110.hs:9:8: error: + • Number of parameters must match family declaration; expected 1 + • In the type instance declaration for ‘R_’ + In the instance declaration for ‘R Eq’ diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 900faca994..ddee25385d 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -163,3 +163,4 @@ test('T13393', normal, compile_fail, ['']) test('T13555', normal, compile_fail, ['']) test('T13659', normal, compile_fail, ['']) test('T13625', normal, compile_fail, ['']) +test('T14110', normal, compile_fail, ['']) |