From: Jérémie Astor Date: Mon, 28 Jun 2021 00:11:49 +0000 (+0200) Subject: :art: Remova allo_currying X-Git-Tag: nightly~562 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=13b78a556fbda10c11c54a2f98053798518774e8;p=gwion.git :art: Remova allo_currying --- diff --git a/include/env/env.h b/include/env/env.h index 822956c4..7ece02a5 100644 --- a/include/env/env.h +++ b/include/env/env.h @@ -25,7 +25,6 @@ struct Env_Scope_ { uint16_t depth; bool in_try; bool in_loop; - bool allow_curry; }; typedef struct Env_ { diff --git a/src/lib/lib_func.c b/src/lib/lib_func.c index bdfe3e41..bf7c6332 100644 --- a/src/lib/lib_func.c +++ b/src/lib/lib_func.c @@ -77,7 +77,6 @@ static OP_CHECK(opck_curry) { const MemPool mp = env->gwion->mp; free_exp(mp, base.args); free_exp(mp, lhs); - env->scope->allow_curry = true; return check_exp_call1(env, &e->d.exp_call) ?: env->gwion->type[et_error]; } diff --git a/src/parse/check.c b/src/parse/check.c index 849d73e8..fbe06144 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -906,7 +906,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 (env->scope->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));