Revert "Changed linear typing for merge."
This reverts commit 0abb050a23
.
This commit is contained in:
parent
fc08800be6
commit
070d2eab55
1 changed files with 2 additions and 12 deletions
|
@ -802,18 +802,8 @@ and expect env lin e =
|
|||
found_lin, env
|
||||
|
||||
| Emerge (_, c_e_list) ->
|
||||
(* Idea: one of the branches should be of linear type [lin], the others can be of linear type
|
||||
Top *)
|
||||
(* TODO: Cedric, avis ?*)
|
||||
let type_clause (env, no_lin) (_, e) =
|
||||
try
|
||||
let _, env = expect env lin e in env, false
|
||||
with _ ->
|
||||
safe_expect env Ltop e, no_lin
|
||||
in
|
||||
let env, no_lin = List.fold_left type_clause (env, true) c_e_list in
|
||||
if no_lin then message e.e_loc (Eunify_failed_one lin);
|
||||
lin, env
|
||||
let env = List.fold_left (fun env (_, e) -> safe_expect env lin e) env c_e_list in
|
||||
lin, env
|
||||
|
||||
| Ewhen (e, _, _) ->
|
||||
expect env lin e
|
||||
|
|
Loading…
Reference in a new issue