diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-03-03 23:08:45 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-03-03 23:14:16 +0000 |
commit | a0d99928b9512af9c00d04cfd7765b733ba0deda (patch) | |
tree | dcef0f949e1dfad2a588da90aabac660948bf448 | |
parent | 455fbadfeb460fd69efadc1506d3581a49bf3987 (diff) | |
download | haskell-a0d99928b9512af9c00d04cfd7765b733ba0deda.tar.gz |
Test Trac #7641
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T7641.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
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, ['']) |