1
0
Fork 0

remove not working stuff

This commit is contained in:
Mylloon 2024-04-30 19:43:32 +02:00
parent 1f203b5138
commit 4c275c7dc6
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 0 additions and 14 deletions

View file

@ -56,13 +56,6 @@ let typeof t =
(* Nested *)
nested_infer env env' ty_fn
| None -> None, env)
| (Some (Type.Var _ as ty1), _), _ ->
(* On this case we may have a function represented as a variable *)
(* TODO: Nested application *)
let ty2 = Type.Arrow (ty1, ty1) in
(match Unification.unify ty1 ty2 with
| Some env' -> Some ty2, env'
| _ -> None, env)
| _ -> None, env)
in
fst (infer TypeSubstitution.empty t)

View file

@ -76,13 +76,6 @@ let tests_typeof =
( Fun (x, Proj (First, Proj (Second, Var x)))
, Pair (Pair (IntConst 1, IntConst 2), Pair (IntConst 3, IntConst 2)) ))
, Some Type.Int )
(* ; (* x -> y -> (x -> y -> z) -> z *)
( "fun x -> fun y -> fun z -> z x y"
, Term.(Fun (x, Fun (y, Fun (z, App (Var z, App (Var x, Var y))))))
, Some
Type.(
Arrow (Var x, Arrow (Var y, Arrow (Arrow (Var x, Arrow (Var y, Var z)), Var z))))
) *)
]
;;