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)