| 401 |
|
|
| 402 |
let rec type_check env e constr precise = |
let rec type_check env e constr precise = |
| 403 |
(* Format.fprintf Format.std_formatter "constr=%a precise=%b@\n" |
(* Format.fprintf Format.std_formatter "constr=%a precise=%b@\n" |
| 404 |
Types.Print.print_descr constr precise; *) |
Types.Print.print_descr constr precise; |
| 405 |
|
*) |
|
|
|
| 406 |
let d = type_check' e.exp_loc env e.exp_descr constr precise in |
let d = type_check' e.exp_loc env e.exp_descr constr precise in |
| 407 |
e.exp_typ <- Types.cup e.exp_typ d; |
e.exp_typ <- Types.cup e.exp_typ d; |
| 408 |
d |
d |
| 637 |
if not (Types.Int.is_int t2) then |
if not (Types.Int.is_int t2) then |
| 638 |
raise_loc loc2 |
raise_loc loc2 |
| 639 |
(Constraint |
(Constraint |
| 640 |
(t1,Types.Int.any, |
(t2,Types.Int.any, |
| 641 |
"The second argument must be an integer")); |
"The second argument must be an integer")); |
| 642 |
Types.Int.put |
Types.Int.put |
| 643 |
(f (Types.Int.get t1) (Types.Int.get t2)); |
(f (Types.Int.get t1) (Types.Int.get t2)); |