diff options
author | johnvg | 2015-12-02 14:09:54 +0000 |
---|---|---|
committer | johnvg | 2015-12-02 14:09:54 +0000 |
commit | de59be2481025376467f0712dde5b8bf1468dd50 (patch) | |
tree | 304ccf0bc2e4c5146826556bd199d2988229c005 /frontend/postparse.icl | |
parent | only allow infix constructor with arity 2, otherwise the compiler may crash w... (diff) |
allow # and | in \ expressions
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2671 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/postparse.icl')
-rw-r--r-- | frontend/postparse.icl | 14 |
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 |