summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T5858.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-03-09 13:35:41 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2012-03-09 13:35:41 +0000
commit3c08377ff43dff06c41f3eecb25d93ae2254ff37 (patch)
tree0aa0024b687ea736c05a85a3e7a8636454240cba /testsuite/tests/typecheck/should_fail/T5858.hs
parent9d9a8975baca0fcb6fe228cc31ce52e35ee10461 (diff)
downloadhaskell-3c08377ff43dff06c41f3eecb25d93ae2254ff37.tar.gz
Test Trac #5858
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T5858.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/T5858.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T5858.hs b/testsuite/tests/typecheck/should_fail/T5858.hs
new file mode 100644
index 0000000000..01a991fb44
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T5858.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE FlexibleInstances, GADTs #-}
+module T5858 where
+
+class InferOverloaded a where
+ infer :: a -> String
+
+-- instance (t1 ~ String, t2 ~ String) => InferOverloaded (t1,t2) where
+instance (t1 ~ String) => InferOverloaded (t1,t1) where
+ infer = show . fst
+
+foo = infer ([],[])