ligo interpreter : review fixes

This commit is contained in:
Lesenechal Remi 2020-02-09 19:04:21 +01:00
parent 3ce0d180f5
commit 0e5a68d58b

View File

@ -271,9 +271,7 @@ and eval : Ast_typed.expression -> env -> value result
= fun term env -> = fun term env ->
match term.expression_content with match term.expression_content with
| E_application ({expr1 = f; expr2 = args}) -> ( | E_application ({expr1 = f; expr2 = args}) -> (
let%bind f' = match f.expression_content with let%bind f' = eval f env in
| E_variable f -> Env.lookup env f
| _ -> eval f env in
match f' with match f' with
| V_Func_val (arg_names, body, f_env) -> | V_Func_val (arg_names, body, f_env) ->
let%bind args' = eval args env in let%bind args' = eval args env in