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

On branch  : ghc-kinds

http://hackage.haskell.org/trac/ghc/changeset/43a724cca4710a4931bcfa3549b4968c4d6eabd3

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

commit 43a724cca4710a4931bcfa3549b4968c4d6eabd3
Author: Simon Peyton Jones <simo...@microsoft.com>
Date:   Fri Nov 4 10:14:22 2011 +0000

    Fix TcArrrows (hackily) for now

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

 compiler/typecheck/TcArrows.lhs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcArrows.lhs b/compiler/typecheck/TcArrows.lhs
index 0dfe8b0..03df359 100644
--- a/compiler/typecheck/TcArrows.lhs
+++ b/compiler/typecheck/TcArrows.lhs
@@ -280,9 +280,14 @@ tc_cmd env cmd@(HsArrForm expr fixity cmd_args) (cmd_stk, 
res_ty)
                -- Check that it has the right shape:
                --      ((w,s1) .. sn)
                -- where the si do not mention w
-          ; checkTc (corner_ty `eqType` mkTyVarTy w_tv && 
-                     not (w_tv `elemVarSet` tyVarsOfTypes arg_tys))
+           ; _bogus <- unifyType corner_ty (mkTyVarTy w_tv)
+          ; checkTc (not (w_tv `elemVarSet` tyVarsOfTypes arg_tys))
                     (badFormFun i tup_ty')
+     -- JPM: WARNING: this test is utterly bogus
+     -- We are not using the coercion returned by the unify;
+     -- and (even more seriously) the w not in arg_tys test is totally
+     -- bogus if there are suspended equality constraints. This code
+     -- needs to be re-architected.
 
           ; tcCmdTop (env { cmd_arr = b }) cmd arg_tys s }
 



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

Reply via email to