[project @ 2005-05-12 16:51:03 by simonpj]
authorsimonpj <unknown>
Thu, 12 May 2005 16:51:03 +0000 (16:51 +0000)
committersimonpj <unknown>
Thu, 12 May 2005 16:51:03 +0000 (16:51 +0000)
Fix bad interaction between operators and higher-rank types
Fixes Source bug #1200592 [GHC fails to pass dictionary in a rank-2 situation]

Merge to STABLE

ghc/compiler/typecheck/TcExpr.lhs

index 74abd23..4cdf5b5 100644 (file)
@@ -266,7 +266,7 @@ tcExpr in_expr@(OpApp arg1 op fix arg2) res_ty
     tcArg op (arg2, arg2_ty, 2)                        `thenM` \ arg2' ->
     addErrCtxt (exprCtxt in_expr)              $
     tcSubExp res_ty op_res_ty                  `thenM` \ co_fn ->
-    returnM (OpApp arg1' op' fix arg2')
+    returnM (co_fn <$> OpApp arg1' op' fix arg2')
 \end{code}
 
 \begin{code}