diff --git a/lib/ast.ml b/lib/ast.ml index 1251524..2edcf93 100644 --- a/lib/ast.ml +++ b/lib/ast.ml @@ -16,7 +16,7 @@ and texpr_kind = | Tname of string (* i32 bool Cursor string *) | Tslice of texpr (* [u8] ptr+len *) | Tarray of len * texpr (* [4 f32] [rows [cols u32]] *) - | Tmap of texpr * texpr (* {string i32} *) + | Tmap of texpr * texpr (* (Map string i32) *) | Tapp of string * texpr list (* (Ptr Cursor) (Option f64) *) | Tfn of texpr list * texpr (* (Fn [a a] bool) *) diff --git a/lib/form.ml b/lib/form.ml index 121ee07..b16ace0 100644 --- a/lib/form.ml +++ b/lib/form.ml @@ -17,7 +17,9 @@ and value = | Byte of int (* \space \0 \( (0..255) *) | List of t list (* (f x) *) | Vec of t list (* [1 2 3] and every binding/type bracket *) - | Map of t list (* {.field v} a struct value, {K V} a type. The + | Map of t list (* {.field v} a struct value, and a defn's + {:where ...} clause. Braces are not a type: the + {K V} spelling was withdrawn for (Map K V). The colon spelling is left for map literals. *) let make v loc = { v; loc } diff --git a/lib/types.ml b/lib/types.ml index ee7f714..90f700f 100644 --- a/lib/types.ml +++ b/lib/types.ml @@ -28,7 +28,7 @@ type t = | Enum of string | Slice of t (* [T] ptr+len, non-owning *) | Array of int64 * t (* [n T] inline, a value, copies *) - | Map of t * t (* {K V} *) + | Map of t * t (* (Map K V) *) | Ptr of t (* (Ptr T) *) (* [Allocator]: a builtin opaque type, the way [string] is a builtin ptr+len. It is a [Types.t] case with no user-writable constructor, which