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