From 13b78a556fbda10c11c54a2f98053798518774e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 28 Jun 2021 02:11:49 +0200 Subject: [PATCH] :art: Remova allo_currying --- include/env/env.h | 1 - src/lib/lib_func.c | 1 - src/parse/check.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) 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)); -- 2.43.0