From cf80ccd9a21c29b8297b920e26cba0efeda24bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Wed, 13 Mar 2019 23:42:16 +0100 Subject: [PATCH] Small tweak on the typed AST --- Typecheck2.ml | 9 ++++++--- Typecheck2.mli | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Typecheck2.ml b/Typecheck2.ml index bb5970036..6a5014102 100644 --- a/Typecheck2.ml +++ b/Typecheck2.ml @@ -5,8 +5,9 @@ module SMap = Map.Make(String) module O = struct type asttodo = [`TODO] (* occurrences of asttodo will point to some part of the original parser AST *) - type type_name = string - type var_name = { name: string; orig: asttodo } + type type_name = {name: string; orig: Region.t} + type var_name = type_name + type record_key = [`Field of string | `Component of int] type pattern = @@ -22,7 +23,9 @@ module O = struct | PSome of pattern | PCons of pattern * pattern | PNull - | PRecord of pattern list + | PRecord of record_key precord + + and 'key precord = ('key * pattern) list type type_constructor = | Option diff --git a/Typecheck2.mli b/Typecheck2.mli index e8fe362f0..777a40a1b 100644 --- a/Typecheck2.mli +++ b/Typecheck2.mli @@ -5,8 +5,9 @@ module SMap : Map.S with type key = string module O : sig type asttodo = [`TODO] (* occurrences of asttodo will point to some part of the original parser AST *) - type type_name = string - type var_name = { name: string; orig: asttodo } + type type_name = {name: string; orig: Region.t} + type var_name = type_name + type record_key = [`Field of string | `Component of int] type pattern = @@ -22,7 +23,9 @@ module O : sig | PSome of pattern | PCons of pattern * pattern | PNull - | PRecord of pattern list + | PRecord of record_key precord + + and 'key precord = ('key * pattern) list type type_constructor = | Option