1
0
Fork 0
This commit is contained in:
Mylloon 2024-04-27 12:43:37 +02:00
parent 11511ab0a2
commit 981c513bd9
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -40,7 +40,7 @@ let typeof t =
| Some _ -> Some ty_fn, env | Some _ -> Some ty_fn, env
| None -> None, env) | None -> None, env)
(* | (Some (Type.Var _ as ty1), _), _ -> (* | (Some (Type.Var _ as ty1), _), _ ->
(* On this case we may have a function represented as the variable *) (* On this case we may have a function represented as a variable *)
let ty2 = Type.Arrow (ty1, ty1) in let ty2 = Type.Arrow (ty1, ty1) in
(match Unification.unify ty1 ty2 with (match Unification.unify ty1 ty2 with
| Some env' -> Some ty2, env' | Some env' -> Some ty2, env'