[project @ 2004-03-11 14:34:22 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcExpr.lhs
index 9ea7a52..1714a33 100644 (file)
@@ -13,7 +13,7 @@ import {-# SOURCE #-} TcSplice( tcSpliceExpr, tcBracket )
 import Id              ( Id )
 import TcType          ( isTauTy )
 import TcEnv           ( checkWellStaged )
-imoprt HsSyn           ( nlHsApp )
+import HsSyn           ( nlHsApp )
 import qualified DsMeta
 #endif
 
@@ -458,11 +458,11 @@ tc_expr expr@(RecordUpd record_expr rbinds) res_ty
        non_upd_field_lbls  = concat relevant_field_lbls_s `minusList` upd_field_lbls
        common_tyvars       = tyVarsOfTypes (map fieldLabelType non_upd_field_lbls)
 
-       mk_inst_ty (tyvar, result_inst_ty) 
+       mk_inst_ty tyvar result_inst_ty 
          | tyvar `elemVarSet` common_tyvars = returnM result_inst_ty   -- Same as result type
          | otherwise                        = newTyVarTy liftedTypeKind        -- Fresh type
     in
-    mappM mk_inst_ty (zip tycon_tyvars result_inst_tys)        `thenM` \ inst_tys ->
+    zipWithM mk_inst_ty tycon_tyvars result_inst_tys   `thenM` \ inst_tys ->
 
        -- STEP 5
        -- Typecheck the expression to be updated
@@ -654,7 +654,10 @@ tcApp fun args res_ty
 -- and say so.
 -- The ~(Check...) is because in the Infer case the tcSubExp 
 -- definitely won't fail, so we can be certain we're in the Check branch
-checkArgsCtxt fun args ~(Check expected_res_ty) actual_res_ty tidy_env
+checkArgsCtxt fun args (Infer _) actual_res_ty tidy_env
+  = return (tidy_env, ptext SLIT("Urk infer"))
+
+checkArgsCtxt fun args (Check expected_res_ty) actual_res_ty tidy_env
   = zonkTcType expected_res_ty   `thenM` \ exp_ty' ->
     zonkTcType actual_res_ty     `thenM` \ act_ty' ->
     let