Remove tuple annotation.

This commit is contained in:
Sander Spies 2020-04-13 10:24:40 +02:00
parent ce1b55e548
commit a4a8e9d2bc

View File

@ -176,7 +176,14 @@ let rec transpile_type (t:AST.type_expression) : type_value result =
aux node in aux node in
ok @@ snd m' ok @@ snd m'
| T_record m -> | T_record m ->
let node = Append_tree.of_list @@ Stage_common.Helpers.kv_list_of_record_or_tuple m in let is_tuple_lmap = Stage_common.Helpers.is_tuple_lmap m in
let node = Append_tree.of_list @@ (
if is_tuple_lmap then
Stage_common.Helpers.tuple_of_record m
else
List.rev @@ LMap.to_kv_list m
)
in
let aux a b : type_value annotated result = let aux a b : type_value annotated result =
let%bind a = a in let%bind a = a in
let%bind b = b in let%bind b = b in
@ -184,8 +191,13 @@ let rec transpile_type (t:AST.type_expression) : type_value result =
in in
let%bind m' = Append_tree.fold_ne let%bind m' = Append_tree.fold_ne
(fun (Stage_common.Types.Label ann, a) -> (fun (Stage_common.Types.Label ann, a) ->
let%bind a = transpile_type a in let%bind a = transpile_type a in
ok (Some ann, a)) ok ((if is_tuple_lmap then
None
else
Some ann),
a)
)
aux node in aux node in
ok @@ snd m' ok @@ snd m'
| T_arrow {type1;type2} -> ( | T_arrow {type1;type2} -> (