summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-03-03 23:08:45 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2013-03-03 23:14:16 +0000
commita0d99928b9512af9c00d04cfd7765b733ba0deda (patch)
treedcef0f949e1dfad2a588da90aabac660948bf448 /testsuite
parent455fbadfeb460fd69efadc1506d3581a49bf3987 (diff)
downloadhaskell-a0d99928b9512af9c00d04cfd7765b733ba0deda.tar.gz
Test Trac #7641
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T7641.hs14
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T7641.hs b/testsuite/tests/typecheck/should_compile/T7641.hs
new file mode 100644
index 0000000000..5d68f4f8bf
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T7641.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+
+module T7641 where
+
+data Foo b = Foo deriving Show
+
+class ToFoo a b where
+ toFoo :: a -> Foo b
+
+instance ToFoo (c -> ()) b where
+ toFoo _ = Foo
+
+baz () = toFoo $ \_ -> ()
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 0fdb2ad466..9160781061 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -397,3 +397,4 @@ test('T7408', normal, compile, [''])
test('UnboxStrictPrimitiveFields', normal, compile, [''])
test('T7541', normal, compile, [''])
test('T7562', normal, compile, [''])
+test('T7641', normal, compile, [''])