diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-09-29 09:23:11 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-09-29 09:23:32 +0100 |
commit | 13d3b531aa565b0fc602feb312f3054e4f1f380a (patch) | |
tree | 93c356b6aa092f50065d0ba9b81233b243699535 /testsuite | |
parent | 0b6024c6fc7c7226d9ba2373eb2a5b7a08311a2e (diff) | |
download | haskell-13d3b531aa565b0fc602feb312f3054e4f1f380a.tar.gz |
Test Trac #12634
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/partial-sigs/should_fail/T12634.hs | 15 | ||||
-rw-r--r-- | testsuite/tests/partial-sigs/should_fail/T12634.stderr | 10 | ||||
-rw-r--r-- | testsuite/tests/partial-sigs/should_fail/all.T | 2 |
3 files changed, 26 insertions, 1 deletions
diff --git a/testsuite/tests/partial-sigs/should_fail/T12634.hs b/testsuite/tests/partial-sigs/should_fail/T12634.hs new file mode 100644 index 0000000000..36865ed831 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T12634.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE ScopedTypeVariables #-} + +module T12634 where + +twacePowDec :: t m' r -> t m r +twacePowDec = undefined + +data Bench a + +bench :: (a -> b) -> a -> Bench params +bench f = undefined + +bench_twacePow :: forall t m m' r . _ => t m' r -> Bench '(t,m,m',r) +bench_twacePow = bench (twacePowDec :: t m' r -> t m r) diff --git a/testsuite/tests/partial-sigs/should_fail/T12634.stderr b/testsuite/tests/partial-sigs/should_fail/T12634.stderr new file mode 100644 index 0000000000..4287110149 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T12634.stderr @@ -0,0 +1,10 @@ + +T12634.hs:14:58: error: + • Expected a type, but + ‘'(t, m, m', r)’ has kind + ‘(k1 -> k2 -> *, k0, k1, k2)’ + • In the first argument of ‘Bench’, namely ‘'(t, m, m', r)’ + In the type ‘t m' r -> Bench '(t, m, m', r)’ + In the type signature: + bench_twacePow :: forall t m m' r. + _ => t m' r -> Bench '(t, m, m', r) diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T index e8f5928c45..dca7f480ed 100644 --- a/testsuite/tests/partial-sigs/should_fail/all.T +++ b/testsuite/tests/partial-sigs/should_fail/all.T @@ -62,4 +62,4 @@ test('T11122', normal, compile, ['']) test('T11976', normal, compile_fail, ['']) test('PatBind3', normal, compile_fail, ['']) test('T12039', normal, compile_fail, ['']) - +test('T12634', normal, compile_fail, ['']) |