[project @ 2001-06-04 16:47:06 by simonpj]
[ghc-hetmet.git] / ghc / compiler / deSugar / DsExpr.lhs
index 02dc08e..a7f8267 100644 (file)
@@ -34,7 +34,7 @@ import FieldLabel     ( FieldLabel, fieldLabelTyCon )
 import CostCentre      ( mkUserCC )
 import Id              ( Id, idType, recordSelectorFieldLabel )
 import PrelInfo                ( rEC_CON_ERROR_ID, iRREFUT_PAT_ERROR_ID )
-import DataCon         ( DataCon, dataConWrapId, dataConArgTys, dataConFieldLabels )
+import DataCon         ( DataCon, dataConWrapId, dataConFieldLabels, dataConInstOrigArgTys )
 import DataCon         ( isExistentialDataCon )
 import Literal         ( Literal(..) )
 import TyCon           ( tyConDataCons )
@@ -408,7 +408,7 @@ dsExpr (RecordUpdOut record_expr record_out_ty dicts rbinds)
              []         -> HsVar old_arg_id
 
        mk_alt con
-         = newSysLocalsDs (dataConArgTys con in_inst_tys)      `thenDs` \ arg_ids ->
+         = newSysLocalsDs (dataConInstOrigArgTys con in_inst_tys) `thenDs` \ arg_ids ->
                -- This call to dataConArgTys won't work for existentials
            let 
                val_args = zipWithEqual "dsExpr:RecordUpd" mk_val_arg
@@ -507,7 +507,7 @@ dsDo do_or_lc stmts return_id then_id fail_id result_ty
        --
        -- In dsDo we can only see DoStmt and ListComp (no gaurds)
 
-       go [ExprStmt expr locn] 
+       go [ResultStmt expr locn]
          | isDoExpr do_or_lc = do_expr expr locn
          | otherwise         = do_expr expr locn       `thenDs` \ expr2 ->
                                returnDs (mkApps (Var return_id) [Type b_ty, expr2])