Commit 9c8651cd authored by Pietro Abate's avatar Pietro Abate
Browse files

Minor aestetic changes

parent 645e3b98
......@@ -3034,6 +3034,7 @@ let apply_raw s t =
let apply_full s t =
let subst_lst,(s,t) = apply_raw s t in
Format.printf "sl = %a\ns = %a\nt = %a\n\n%!" Tallying.CS.pp_sl subst_lst Print.print s Print.print t;
let ss =
List.fold_left (fun tacc constr_lst ->
cap tacc (List.fold_left (fun tacc subst ->
......@@ -3045,6 +3046,7 @@ let apply_full s t =
Positive.substitute tacc subst) t constr_lst)) any subst_lst
in
let arr = Arrow.get ss in
Format.printf "aaaa\n%!";
Arrow.apply arr (tt)
let apply s t = fst (apply_raw s t)
......@@ -880,11 +880,12 @@ and type_check' loc env e constr precise = match e with
should_have loc constr
"but the interface of the abstraction is not compatible"
in
let env = match a.fun_name with
| None -> env
| Some f -> enter_value f a.fun_typ env in
List.iter
(fun (t1,t2) ->
let env =
match a.fun_name with
| None -> env
| Some f -> enter_value f a.fun_typ env
in
List.iter (fun (t1,t2) ->
let acc = a.fun_body.br_accept in
if not (Types.subtype t1 acc) then
raise_loc loc (NonExhaustive (Types.diff t1 acc));
......@@ -1076,16 +1077,14 @@ and type_record loc env r constr precise =
if precise then Types.record_fields (false, res)
else constr
and type_check_branches loc env targ brs constr precise =
if Types.is_empty targ then Types.empty
else (
else begin
brs.br_typ <- Types.cup brs.br_typ targ;
branches_aux loc env targ
(if precise then Types.empty else constr)
constr precise brs.br_branches
)
end
and branches_aux loc env targ tres constr precise = function
| [] -> tres
......
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