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

On branch  : master

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

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

commit ab4728c1f1959c1b377d9ed168f46d4534551212
Author: Simon Peyton Jones <[email protected]>
Date:   Tue Aug 21 14:38:18 2012 +0100

    Test Trac #7173

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

 tests/typecheck/should_compile/T7173.hs |   18 ++++++++++++++++++
 tests/typecheck/should_compile/all.T    |    1 +
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/tests/typecheck/should_compile/T7173.hs 
b/tests/typecheck/should_compile/T7173.hs
new file mode 100644
index 0000000..231b18b
--- /dev/null
+++ b/tests/typecheck/should_compile/T7173.hs
@@ -0,0 +1,18 @@
+module T7173 where
+
+
+-- se and sb are mutually recursive
+--   se takes a numeric parameter (which it ignores)
+--   sb passes it a constant 10
+--
+-- so sb :: Num a => ...type not involving a...
+--
+-- So the ambiguity check must default ambiguous p, 
+-- rather than complaining that sb is ambiguous.
+
+showEnv' env t = se 10 env t 
+ where
+   se p env (Bind n b sc) = sb env n b
+   sb env n t             = se 10 env t
+
+data TT n = Bind n (TT n) (TT n)
diff --git a/tests/typecheck/should_compile/all.T 
b/tests/typecheck/should_compile/all.T
index 6b9aa4e..6aef886 100644
--- a/tests/typecheck/should_compile/all.T
+++ b/tests/typecheck/should_compile/all.T
@@ -384,3 +384,4 @@ test('TcLambdaCase', if_compiler_lt('ghc', '7.5', skip), 
compile, [''])
 test('T7147', normal, compile, [''])
 test('T7171',normal,run_command,
      ['$MAKE -s --no-print-directory T5792'])
+test('T7173', normal, compile, [''])



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to