Skip to content
Snippets Groups Projects
Commit 08553288 authored by sof's avatar sof
Browse files

[project @ 1997-06-05 20:06:02 by sof]

Unwrap CoreSyn.Coerce when looking at the function arg in the xlation of CoreSyn.App
parent 4a6d5bcf
No related branches found
No related tags found
No related merge requests found
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment