[commit: testsuite] master: Test Trac #5032 (5b5ac3a)
Simon Peyton Jones
simonpj at microsoft.com
Tue Aug 16 12:46:51 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/5b5ac3aa150dff4349d97fb365000c546923793a
>---------------------------------------------------------------
commit 5b5ac3aa150dff4349d97fb365000c546923793a
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue Aug 16 11:43:31 2011 +0100
Test Trac #5032
>---------------------------------------------------------------
tests/typecheck/should_compile/T5032.hs | 20 ++++++++++++++++++++
tests/typecheck/should_compile/all.T | 1 +
2 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/tests/typecheck/should_compile/T5032.hs b/tests/typecheck/should_compile/T5032.hs
new file mode 100644
index 0000000..1412d16
--- /dev/null
+++ b/tests/typecheck/should_compile/T5032.hs
@@ -0,0 +1,20 @@
+-- Tests pattern bindings that are generalised
+
+module T5032 where
+
+id1 :: a -> a
+(id1) = id
+
+foo = (id1 True, id1 'x')
+
+g :: a -> a
+h :: a -> a
+(g, h) = (\x -> x, \y -> y)
+
+too = (g (h True), g (h 'x'))
+
+-- No type signature necessary;
+-- the MR only strikes when overloading is involved
+[id3] = [id]
+
+noo = (id3 True, id3 'x')
diff --git a/tests/typecheck/should_compile/all.T b/tests/typecheck/should_compile/all.T
index b844045..d620f0b 100644
--- a/tests/typecheck/should_compile/all.T
+++ b/tests/typecheck/should_compile/all.T
@@ -346,3 +346,4 @@ test('SilentParametersOverlapping', normal, compile, [''])
test('GivenTypeSynonym', normal, compile, [''])
test('T5051', normal, compile, [''])
test('T3018', normal, compile, [''])
+test('T5032', normal, compile, [''])
More information about the Cvs-ghc
mailing list