Small tweak on the typed AST

This commit is contained in:
Georges Dupéron 2019-03-13 23:42:16 +01:00
parent 650206ec14
commit cf80ccd9a2
2 changed files with 12 additions and 6 deletions

View File

@ -5,8 +5,9 @@ module SMap = Map.Make(String)
module O = struct module O = struct
type asttodo = [`TODO] (* occurrences of asttodo will point to some part of the original parser AST *) type asttodo = [`TODO] (* occurrences of asttodo will point to some part of the original parser AST *)
type type_name = string type type_name = {name: string; orig: Region.t}
type var_name = { name: string; orig: asttodo } type var_name = type_name
type record_key = [`Field of string | `Component of int] type record_key = [`Field of string | `Component of int]
type pattern = type pattern =
@ -22,7 +23,9 @@ module O = struct
| PSome of pattern | PSome of pattern
| PCons of pattern * pattern | PCons of pattern * pattern
| PNull | PNull
| PRecord of pattern list | PRecord of record_key precord
and 'key precord = ('key * pattern) list
type type_constructor = type type_constructor =
| Option | Option

View File

@ -5,8 +5,9 @@ module SMap : Map.S with type key = string
module O : sig module O : sig
type asttodo = [`TODO] (* occurrences of asttodo will point to some part of the original parser AST *) type asttodo = [`TODO] (* occurrences of asttodo will point to some part of the original parser AST *)
type type_name = string type type_name = {name: string; orig: Region.t}
type var_name = { name: string; orig: asttodo } type var_name = type_name
type record_key = [`Field of string | `Component of int] type record_key = [`Field of string | `Component of int]
type pattern = type pattern =
@ -22,7 +23,9 @@ module O : sig
| PSome of pattern | PSome of pattern
| PCons of pattern * pattern | PCons of pattern * pattern
| PNull | PNull
| PRecord of pattern list | PRecord of record_key precord
and 'key precord = ('key * pattern) list
type type_constructor = type type_constructor =
| Option | Option