Commit f93a6ba1 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Modify applyTest.ml to call the correct typing function.

Fix typing of application. Apply the polymorphic code when either the function or its argument have variables.
parent a0616bd6
This diff is collapsed.
......@@ -962,10 +962,11 @@ and type_check' loc env ed constr precise = match ed with
end;
let dom = Types.Arrow.domain(t1arrow) in
let t2 = type_check env e2 Types.any true in
let res =
if not(Types.is_closed env.delta dom) then
if not(Types.is_closed env.delta dom) ||
not (Types.is_closed env.delta t2) then
(* get t2 without constraint check *)
let t2 = type_check env e2 Types.any true in
let (sl,res) =
(* s [_delta dom(t) *)
try Types.squareapply env.delta t1 t2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment