Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/fb2d7411d4424dfadd123d2997b2a844910f2b93

>---------------------------------------------------------------

commit fb2d7411d4424dfadd123d2997b2a844910f2b93
Author: Simon Peyton Jones <simo...@microsoft.com>
Date:   Mon Dec 24 09:49:29 2012 +0000

    Test Trac #7525

>---------------------------------------------------------------

 tests/typecheck/should_fail/T7525.hs     |   15 +++++++++++++++
 tests/typecheck/should_fail/T7525.stderr |    9 +++++++++
 tests/typecheck/should_fail/all.T        |    1 +
 3 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/tests/typecheck/should_fail/T7525.hs 
b/tests/typecheck/should_fail/T7525.hs
new file mode 100644
index 0000000..b0ed11f
--- /dev/null
+++ b/tests/typecheck/should_fail/T7525.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE ImplicitParams #-}
+module T7525 where
+
+hmm :: Bool
+hmm = let ?a = True in ?a && ?b
+
+{- The error message should say
+
+    Could not deduce (?b::Bool)
+      arising from a use of implicit parameter `?b'
+    from the context (?a::Bool)
+
+That is, the context should be (?a :: Bool) not (?a :: t0).
+-}
+
diff --git a/tests/typecheck/should_fail/T7525.stderr 
b/tests/typecheck/should_fail/T7525.stderr
new file mode 100644
index 0000000..032de67
--- /dev/null
+++ b/tests/typecheck/should_fail/T7525.stderr
@@ -0,0 +1,9 @@
+
+T7525.hs:5:30:
+    Could not deduce (?b::Bool)
+      arising from a use of implicit parameter `?b'
+    from the context (?a::Bool)
+      bound by the implicit-parameter bindings for ?a at T7525.hs:5:7-31
+    In the second argument of `(&&)', namely `?b'
+    In the expression: ?a && ?b
+    In the expression: let ?a = True in ?a && ?b
diff --git a/tests/typecheck/should_fail/all.T 
b/tests/typecheck/should_fail/all.T
index 2e1ec6e..168dc16 100644
--- a/tests/typecheck/should_fail/all.T
+++ b/tests/typecheck/should_fail/all.T
@@ -289,3 +289,4 @@ test('T6069', normal, compile_fail, [''])
 test('T7220', normal, compile_fail, [''])
 test('T7410', normal, compile_fail, [''])
 test('T7453', normal, compile_fail, [''])
+test('T7525', normal, compile_fail, [''])



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to