From a0d99928b9512af9c00d04cfd7765b733ba0deda Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Sun, 3 Mar 2013 23:08:45 +0000 Subject: Test Trac #7641 --- testsuite/tests/typecheck/should_compile/T7641.hs | 14 ++++++++++++++ testsuite/tests/typecheck/should_compile/all.T | 1 + 2 files changed, 15 insertions(+) create mode 100644 testsuite/tests/typecheck/should_compile/T7641.hs (limited to 'testsuite') 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, ['']) -- cgit v1.2.1