Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d5794650edd0566ed97c0761646ec0be3f4aa51c >--------------------------------------------------------------- commit d5794650edd0566ed97c0761646ec0be3f4aa51c Author: Simon Peyton Jones <[email protected]> Date: Sun Mar 3 23:08:45 2013 +0000 Test Trac #7641 >--------------------------------------------------------------- tests/typecheck/should_compile/T7641.hs | 14 ++++++++++++++ tests/typecheck/should_compile/all.T | 1 + 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/tests/typecheck/should_compile/T7641.hs b/tests/typecheck/should_compile/T7641.hs new file mode 100644 index 0000000..5d68f4f --- /dev/null +++ b/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/tests/typecheck/should_compile/all.T b/tests/typecheck/should_compile/all.T index 0fdb2ad..9160781 100644 --- a/tests/typecheck/should_compile/all.T +++ b/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, ['']) _______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
