From 97db2a431c49b0866bc2bcbc73e045d938463ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Thu, 14 Mar 2019 11:50:18 +0100 Subject: [PATCH] type_expr vs. type_expr_case (put the regions and names in more places) in Typecheck2.mli --- Typecheck2.ml | 12 ++++++------ Typecheck2.mli | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Typecheck2.ml b/Typecheck2.ml index 252407485..027797091 100644 --- a/Typecheck2.ml +++ b/Typecheck2.ml @@ -36,19 +36,19 @@ module O = struct | Map type type_expr_case = - | Sum of (type_name * type_expr_case) list + | Sum of (type_name * type_expr) list | Record of record_key type_record - | TypeApp of type_constructor * (type_expr_case list) - | Function of { arg: type_expr_case; ret: type_expr_case } - | Ref of type_expr_case + | TypeApp of type_constructor * (type_expr list) + | Function of { arg: type_expr; ret: type_expr } + | Ref of type_expr | TC of type_constructor | String | Int | Unit | Bool - and 'key type_record = ('key * type_expr_case) list + and 'key type_record = ('key * type_expr) list - type type_expr = { type_expr: type_expr_case; name: string option; orig: AST.type_expr } + and type_expr = { type_expr: type_expr_case; name: string option; orig: AST.type_expr } type typed_var = { name:var_name; ty:type_expr; orig: asttodo } diff --git a/Typecheck2.mli b/Typecheck2.mli index 41a87b1c7..d90558afb 100644 --- a/Typecheck2.mli +++ b/Typecheck2.mli @@ -30,25 +30,25 @@ module O : sig and 'key precord = ('key * pattern) list type type_constructor = - | Option + Option | List | Set | Map type type_expr_case = - | Sum of (type_name * type_expr_case) list + Sum of (type_name * type_expr) list | Record of record_key type_record - | TypeApp of type_constructor * (type_expr_case list) - | Function of { arg: type_expr_case; ret: type_expr_case } - | Ref of type_expr_case + | TypeApp of type_constructor * (type_expr list) + | Function of { arg: type_expr; ret: type_expr } + | Ref of type_expr | TC of type_constructor | String | Int | Unit | Bool - and 'key type_record = ('key * type_expr_case) list + and 'key type_record = ('key * type_expr) list - type type_expr = { type_expr: type_expr_case; name: string option; orig: AST.type_expr } + and type_expr = { type_expr: type_expr_case; name: string option; orig: AST.type_expr } type typed_var = { name:var_name; ty:type_expr; orig: asttodo }