diff --git a/lib/inference.ml b/lib/inference.ml index f06b55c..905c94d 100644 --- a/lib/inference.ml +++ b/lib/inference.ml @@ -42,7 +42,7 @@ let typeof t = | (Some (Type.Arrow (ty_param, ty_fn)), _), (Some ty_args, _) -> (* Check if the argument type matches the parameter type *) (match Unification.unify ty_param ty_args with - | Some _ -> Some ty_fn, env + | Some env' -> Some ty_fn, env' | None -> None, env) (* | (Some (Type.Var _ as ty1), _), _ -> (* On this case we may have a function represented as a variable *) @@ -50,7 +50,6 @@ let typeof t = (match Unification.unify ty1 ty2 with | Some env' -> Some ty2, env' | _ -> None, env) *) - | (Some _, _), _ -> None, env | _ -> None, env) in fst (infer TypeSubstitution.empty t)