summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T7641.hs
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/tests/typecheck/should_compile/T7641.hs
parent455fbadfeb460fd69efadc1506d3581a49bf3987 (diff)
downloadhaskell-a0d99928b9512af9c00d04cfd7765b733ba0deda.tar.gz
Test Trac #7641
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T7641.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/T7641.hs14
1 files changed, 14 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 $ \_ -> ()