summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail181.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail181.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail181.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail181.hs b/testsuite/tests/typecheck/should_fail/tcfail181.hs
new file mode 100644
index 0000000000..01d06599ef
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/tcfail181.hs
@@ -0,0 +1,18 @@
+-- GHC 6.7 at one point said wog's type was:
+--
+-- wog :: forall t e (m :: * -> *).
+-- (Monad GHC.Prim.Any1, Monad m) =>
+-- t -> Something (m Bool) e
+--
+-- The stupid 'GHC.Prim.Any1' arose becuase of type ambiguity
+-- which should be reported, and wasn't.
+
+module ShouldFail where
+
+data Something d e = Something{ bar:: d, initializer::e }
+
+foo :: (Monad m) => Something (m Bool) n
+foo = undefined
+
+wog x = foo{bar = return True}
+