Test Trac #8889
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 17 Mar 2014 13:50:54 +0000 (13:50 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 17 Mar 2014 13:51:09 +0000 (13:51 +0000)
testsuite/tests/indexed-types/should_compile/T8889.hs [new file with mode: 0644]
testsuite/tests/indexed-types/should_compile/T8889.stderr [new file with mode: 0644]
testsuite/tests/indexed-types/should_compile/all.T

diff --git a/testsuite/tests/indexed-types/should_compile/T8889.hs b/testsuite/tests/indexed-types/should_compile/T8889.hs
new file mode 100644 (file)
index 0000000..45c88a6
--- /dev/null
@@ -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 (file)
index 0000000..77e05d7
--- /dev/null
@@ -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
index f722ea3..5c156ec 100644 (file)
@@ -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, [''])