aboutsummaryrefslogtreecommitdiff
path: root/frontend/postparse.icl
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/postparse.icl')
-rw-r--r--frontend/postparse.icl14
1 files changed, 6 insertions, 8 deletions
diff --git a/frontend/postparse.icl b/frontend/postparse.icl
index 7443610..0108f3d 100644
--- a/frontend/postparse.icl
+++ b/frontend/postparse.icl
@@ -117,9 +117,9 @@ where
collectFunctions (PE_Bound bound_expr) icl_module ca
# (bound_expr, ca) = collectFunctions bound_expr icl_module ca
= (PE_Bound bound_expr, ca)
- collectFunctions (PE_Lambda lam_ident args res pos) icl_module ca
- # ((args,res), ca) = collectFunctions (args,res) icl_module ca
- # (range, ca) = addFunctionsRange [transformLambda lam_ident args res pos] ca
+ collectFunctions (PE_Lambda lam_ident args rhs pos) icl_module ca
+ # ((args,rhs), ca) = collectFunctions (args,rhs) icl_module ca
+ # (range, ca) = addFunctionsRange [transformLambda lam_ident args rhs pos] ca
= (PE_Let (CollectedLocalDefs { loc_functions = range, loc_nodes = [], loc_in_icl_module=icl_module })
(PE_Ident lam_ident), ca)
collectFunctions (PE_Record rec_expr type_ident fields) icl_module ca
@@ -380,11 +380,9 @@ instance collectFunctions ParsedBody where
NoCollectedLocalDefs :== CollectedLocalDefs { loc_functions = { ir_from = 0, ir_to = 0 }, loc_nodes = [], loc_in_icl_module=True }
-transformLambda :: Ident [ParsedExpr] ParsedExpr Position -> FunDef
-transformLambda lam_ident args result pos
- # lam_rhs = { rhs_alts = UnGuardedExpr { ewl_nodes = [], ewl_expr = result, ewl_locals = NoCollectedLocalDefs, ewl_position = NoPos },
- rhs_locals = NoCollectedLocalDefs }
- lam_body = [{pb_args = args, pb_rhs = lam_rhs, pb_position = pos }]
+transformLambda :: Ident [ParsedExpr] Rhs Position -> FunDef
+transformLambda lam_ident args rhs pos
+ # lam_body = [{pb_args = args, pb_rhs = rhs, pb_position = pos }]
= MakeNewImpOrDefFunction lam_ident (length args) lam_body (FK_Function cNameLocationDependent) NoPrio No pos
makeConsExpressionForGenerator :: GeneratorKind ParsedExpr ParsedExpr -> ParsedExpr