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

Only use the old typing of applications for ground types (not types with only...

Only use the old typing of applications for ground types (not types with only monomorphic variables)
parent 43c6695c
......@@ -58,3 +58,6 @@ let id ('a -> 'a)
| x -> x
;;
id 42;;
let apply ( f : 'a -> 'b) (x : 'a ) : 'b =
f (x,x)
;;
......@@ -968,8 +968,8 @@ and type_check' loc env ed constr precise = match ed with
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) ||
not (Types.is_closed env.delta t2) then
if not (Types.no_var dom) ||
not (Types.no_var t2) then
(* get t2 without constraint check *)
let (sl,res) =
(* s [_delta dom(t) *)
......@@ -984,7 +984,7 @@ and type_check' loc env ed constr precise = match ed with
let t2 = type_check env e2 dom true in
Types.Arrow.apply t1arrow t2
else begin
(ignore (type_check env e2 dom false);
(ignore (type_check env e2 dom true);
Types.Arrow.apply_noarg t1arrow)
end
end
......
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