From 08553288a587bbef94f690f90f84818e116759da Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 5 Jun 1997 20:06:02 +0000 Subject: [PATCH] [project @ 1997-06-05 20:06:02 by sof] Unwrap CoreSyn.Coerce when looking at the function arg in the xlation of CoreSyn.App --- ghc/compiler/stgSyn/CoreToStg.lhs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ghc/compiler/stgSyn/CoreToStg.lhs b/ghc/compiler/stgSyn/CoreToStg.lhs index fa8dcd3..4fda026 100644 --- a/ghc/compiler/stgSyn/CoreToStg.lhs +++ b/ghc/compiler/stgSyn/CoreToStg.lhs @@ -25,6 +25,7 @@ import CoreUtils ( coreExprType ) import CostCentre ( noCostCentre ) import Id ( mkSysLocal, idType, isBottomingId, externallyVisibleId, + nullIdEnv, addOneToIdEnv, lookupIdEnv, growIdEnvList, SYN_IE(IdEnv), GenId{-instance NamedThing-}, SYN_IE(Id) ) @@ -292,6 +293,7 @@ coreExprToStg env expr@(App _ _) coreExprToStg env non_var_fun other -> -- A non-variable applied to things; better let-bind it. +-- pprTrace "coreExprToStg" (ppr PprDebug expr) $ newStgVar (coreExprType fun) `thenUs` \ fun_id -> coreExprToStg env fun `thenUs` \ (stg_fun) -> let @@ -309,6 +311,7 @@ coreExprToStg env expr@(App _ _) collect_args (App e (TyArg _)) args = collect_args e args collect_args (App e (UsageArg _)) args = collect_args e args collect_args (App fun arg) args = collect_args fun (arg:args) + collect_args (Coerce _ _ expr) args = collect_args expr args collect_args fun args = (fun, args) \end{code} -- 1.7.10.4