From 271b0598a2b825cbc476f15a790df64d5ce76ea8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 6 Sep 2021 20:34:55 +0200 Subject: [PATCH] :art: Remove allow_curry --- ast | 2 +- src/lib/lib_func.c | 1 - src/lib/opfunc.c | 1 - src/parse/check.c | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ast b/ast index 27e08ede..36d83348 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 27e08ede9f3da51fcea1a54c599a019a64759ec1 +Subproject commit 36d83348fe027cd0c5bb6a388f9582d80914c7cc diff --git a/src/lib/lib_func.c b/src/lib/lib_func.c index 2ca87853..43c4c70b 100644 --- a/src/lib/lib_func.c +++ b/src/lib/lib_func.c @@ -16,7 +16,6 @@ static OP_CHECK(opck_func_call) { Exp_Binary *bin = (Exp_Binary *)data; Exp_Call call = {.func = bin->rhs, .args = bin->lhs}; - call.allow_curry = true; Exp e = exp_self(bin); e->exp_type = ae_exp_call; memcpy(&e->d.exp_call, &call, sizeof(Exp_Call)); diff --git a/src/lib/opfunc.c b/src/lib/opfunc.c index 1b8fc0c4..1cc26d58 100644 --- a/src/lib/opfunc.c +++ b/src/lib/opfunc.c @@ -114,7 +114,6 @@ base->type = t; self->d.exp_call.func = func; self->d.exp_call.args = args; self->d.exp_call.tmpl = NULL; - self->d.exp_call.allow_curry = false; self->exp_type = ae_exp_call; CHECK_BN(traverse_exp(env, self)); return self->type; diff --git a/src/parse/check.c b/src/parse/check.c index 46134f15..6a281cf6 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -917,7 +917,7 @@ ANN2(1) static inline bool curried(const Env env, Exp exp) { } ANN static Type check_exp_call(const Env env, Exp_Call *exp) { - if (exp->allow_curry && curried(env, exp->args)) + if (curried(env, exp->args)) return env->gwion->type[et_curry]; if (exp->tmpl) { DECL_BO(const m_bool, ret, = func_check(env, exp)); -- 2.43.0