From b93ae6094a95e3bfaed9196f396ea72d3d66ea74 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Thu, 19 Apr 2018 15:13:10 +0100 Subject: Fix bug with function being applied to tuples For some reason there was a desugaring rule that mapped f((x, y)) to f(x, y) in initial_check.ml, this prevented functions and constructors from being applied to tuples. --- src/initial_check.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/initial_check.ml') diff --git a/src/initial_check.ml b/src/initial_check.ml index c6bc5fbe..62c1af02 100644 --- a/src/initial_check.ml +++ b/src/initial_check.ml @@ -493,8 +493,7 @@ and to_ast_exp (k_env : kind Envmap.t) (def_ord : order) (Parse_ast.E_aux(exp,l) | Parse_ast.E_app(f,args) -> (match List.map (to_ast_exp k_env def_ord) args with | [] -> E_app(to_ast_id f, []) - | [E_aux(E_tuple(exps),_)] -> E_app(to_ast_id f, exps) - | exps -> E_app(to_ast_id f, exps)) + | exps -> E_app(to_ast_id f, exps)) | Parse_ast.E_app_infix(left,op,right) -> E_app_infix(to_ast_exp k_env def_ord left, to_ast_id op, to_ast_exp k_env def_ord right) | Parse_ast.E_tuple(exps) -> E_tuple(List.map (to_ast_exp k_env def_ord) exps) -- cgit v1.2.3