Flatten arguments fix in cloking.
This commit is contained in:
parent
1e6ec0a7d0
commit
6da5171e6a
2 changed files with 4 additions and 6 deletions
|
@ -195,11 +195,8 @@ let unalias_type ty =
|
|||
with Undefined_type ln -> error (Eundefined (fullname ln))
|
||||
|
||||
let flatten_ty_list l =
|
||||
let flatten = function
|
||||
| Tprod l -> l
|
||||
| ty -> [ty]
|
||||
in
|
||||
List.flatten (List.map flatten l)
|
||||
List.fold_right
|
||||
(fun arg args -> match arg with Tprod l -> l@args | a -> a::args ) l []
|
||||
|
||||
let rec unify t1 t2 =
|
||||
match t1, t2 with
|
||||
|
|
|
@ -63,7 +63,8 @@ let rec typing h e =
|
|||
|
||||
and typing_op op e_list h e ck = match op with
|
||||
| (Eequal | Efun _ | Enode _) ->
|
||||
(List.iter (expect h (Ck ck)) e_list; skeleton ck e.e_ty)
|
||||
List.iter (fun e -> expect h (skeleton ck e.e_ty) e) e_list;
|
||||
skeleton ck e.e_ty
|
||||
| Etuple ->
|
||||
Cprod (List.map (typing h) e_list)
|
||||
| Eifthenelse ->
|
||||
|
|
Loading…
Reference in a new issue