diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-03-09 13:35:41 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-03-09 13:35:41 +0000 |
commit | 3c08377ff43dff06c41f3eecb25d93ae2254ff37 (patch) | |
tree | 0aa0024b687ea736c05a85a3e7a8636454240cba /testsuite/tests/typecheck/should_fail/T5858.hs | |
parent | 9d9a8975baca0fcb6fe228cc31ce52e35ee10461 (diff) | |
download | haskell-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.hs | 11 |
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 ([],[]) |