From 96468bd8ff55b00adbdeb40bc601cd15b5b8060a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Thu, 30 Jan 2020 13:09:34 +0000 Subject: [PATCH] Disabled conversion of records & variants to type constructor + argument list in new typer, the current implementation is just wrong. --- src/passes/4-typer-new/solver.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/passes/4-typer-new/solver.ml b/src/passes/4-typer-new/solver.ml index 4f9c96388..7175fab54 100644 --- a/src/passes/4-typer-new/solver.ml +++ b/src/passes/4-typer-new/solver.ml @@ -35,8 +35,10 @@ module Wrap = struct let rec type_expression_to_type_value : T.type_value -> O.type_value = fun te -> match te.type_value' with | T_sum kvmap -> + let () = failwith "fixme: don't use to_list, it drops the variant keys, rows have a differnt kind than argument lists for now!" in P_constant (C_variant, T.CMap.to_list @@ T.CMap.map type_expression_to_type_value kvmap) | T_record kvmap -> + let () = failwith "fixme: don't use to_list, it drops the record keys, rows have a differnt kind than argument lists for now!" in P_constant (C_record, T.LMap.to_list @@ T.LMap.map type_expression_to_type_value kvmap) | T_arrow (arg , ret) -> P_constant (C_arrow, List.map type_expression_to_type_value [ arg ; ret ]) @@ -77,8 +79,10 @@ module Wrap = struct let rec type_expression_to_type_value_copypasted : I.type_expression -> O.type_value = fun te -> match te.type_expression' with | T_sum kvmap -> + let () = failwith "fixme: don't use to_list, it drops the variant keys, rows have a differnt kind than argument lists for now!" in P_constant (C_variant, I.CMap.to_list @@ I.CMap.map type_expression_to_type_value_copypasted kvmap) | T_record kvmap -> + let () = failwith "fixme: don't use to_list, it drops the record keys, rows have a differnt kind than argument lists for now!" in P_constant (C_record, I.LMap.to_list @@ I.LMap.map type_expression_to_type_value_copypasted kvmap) | T_arrow (arg , ret) -> P_constant (C_arrow, List.map type_expression_to_type_value_copypasted [ arg ; ret ])