Small tweak on the typed AST
This commit is contained in:
parent
650206ec14
commit
cf80ccd9a2
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user