From 5085876ed86431b3279e33d56566860fb038b1f2 Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 25 Aug 1997 21:41:33 +0000 Subject: [PATCH] [project @ 1997-08-25 21:41:33 by sof] dsExpr: updated to use RecordConOut constructor --- ghc/compiler/deSugar/DsExpr.lhs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ghc/compiler/deSugar/DsExpr.lhs b/ghc/compiler/deSugar/DsExpr.lhs index 3969f3f..1b46e77 100644 --- a/ghc/compiler/deSugar/DsExpr.lhs +++ b/ghc/compiler/deSugar/DsExpr.lhs @@ -390,10 +390,9 @@ before printing it as \begin{code} -dsExpr (RecordCon con_expr rbinds) +dsExpr (RecordConOut con_id con_expr rbinds) = dsExpr con_expr `thenDs` \ con_expr' -> let - con_id = get_con con_expr' (arg_tys, _) = splitFunTy (coreExprType con_expr') mk_arg (arg_ty, lbl) @@ -405,11 +404,6 @@ dsExpr (RecordCon con_expr rbinds) in mapDs mk_arg (zipEqual "dsExpr:RecordCon" arg_tys (dataConFieldLabels con_id)) `thenDs` \ con_args -> mkAppDs con_expr' (map VarArg con_args) - where - -- "con_expr'" is simply an application of the constructor Id - -- to types and (perhaps) dictionaries. This gets the constructor... - get_con (Var con) = con - get_con (App fun _) = get_con fun \end{code} Record update is a little harder. Suppose we have the decl: -- 1.7.10.4