From b809467cff1655c61d6f4767b1236a10d4722f33 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 14 Apr 2024 03:14:01 +0200 Subject: [PATCH] todo --- lib/inference.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/inference.ml b/lib/inference.ml index 4a3ad5b..89b5e96 100644 --- a/lib/inference.ml +++ b/lib/inference.ml @@ -35,9 +35,10 @@ let typeof t = | None, _ -> Some (Type.Arrow (Type.Var id, ty_body)), env') | _ -> None, env) | Term.App (t1, t2) -> - (* Check if the function type matches the arguments *) + (* TODO: When a variable is a function *) (match infer env t1, infer env t2 with | (Some (Type.Arrow (ty_param, ty_fn)), _), (Some ty_args, _) -> + (* Check if the function type matches the arguments *) (match Unification.unify ty_param ty_args with | Some _ -> Some ty_fn, env | None -> None, env)