diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-03-17 13:50:54 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-03-17 13:51:09 +0000 |
commit | 0e2155ddb10f4ccf53e50064756cbc3ce7dd8832 (patch) | |
tree | 9eb86569a5526b4c284a3321d221a4aa69b55700 /testsuite | |
parent | f4d15cb97a0d480d39ef4272192ca731fb732c6d (diff) | |
download | haskell-0e2155ddb10f4ccf53e50064756cbc3ce7dd8832.tar.gz |
Test Trac #8889
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/T8889.hs | 12 | ||||
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/T8889.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/all.T | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T8889.hs b/testsuite/tests/indexed-types/should_compile/T8889.hs new file mode 100644 index 0000000000..45c88a6a18 --- /dev/null +++ b/testsuite/tests/indexed-types/should_compile/T8889.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE TypeFamilies, ConstraintKinds #-} +{-# OPTIONS_GHC -fwarn-missing-signatures #-} -- Report f's inferred type + +module T8889 where + +import GHC.Exts + +class C f where + type C_fmap f a :: Constraint + foo :: C_fmap f a => (a -> b) -> f a -> f b + +f x = foo x diff --git a/testsuite/tests/indexed-types/should_compile/T8889.stderr b/testsuite/tests/indexed-types/should_compile/T8889.stderr new file mode 100644 index 0000000000..77e05d764b --- /dev/null +++ b/testsuite/tests/indexed-types/should_compile/T8889.stderr @@ -0,0 +1,6 @@ + +T8889.hs:12:1: Warning: + Top-level binding with no type signature: + f :: forall (f :: * -> *) a b. + (C_fmap f a, C f) => + (a -> b) -> f a -> f b diff --git a/testsuite/tests/indexed-types/should_compile/all.T b/testsuite/tests/indexed-types/should_compile/all.T index f722ea3b4f..5c156ec28e 100644 --- a/testsuite/tests/indexed-types/should_compile/all.T +++ b/testsuite/tests/indexed-types/should_compile/all.T @@ -239,3 +239,4 @@ test('ClosedFam1', extra_clean(['ClosedFam1.o-boot', 'ClosedFam1.hi-boot']), test('ClosedFam2', extra_clean(['ClosedFam2.o-boot', 'ClosedFam2.hi-boot']), multimod_compile, ['ClosedFam2', '-v0']) test('T8651', normal, compile, ['']) +test('T8889', normal, compile, ['']) |