diff options
Diffstat (limited to 'lib/model/field.mli')
| -rw-r--r-- | lib/model/field.mli | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/model/field.mli b/lib/model/field.mli index caa7b26..0619f33 100644 --- a/lib/model/field.mli +++ b/lib/model/field.mli @@ -2,11 +2,18 @@ type textI18n = (string * string) list (** A label is just an association list*) type validation = { rule : string list Dsl.t; message : textI18n } -type 't field_ex = T : ('a, 't) Typ.t -> 't field_ex +type 't field_ex = T : ('db, 'ocaml, 't) Typ.t -> 't field_ex type 'ref t (** Description of a field *) +val named_of : + 'ref t -> ('db, 'ocaml, 'ref) Typ.t -> (('db, 'ocaml, 'ref) Typ.t) Typ.named option +(** [named_of field typ] is [Some named] — the field's {!Typ.named} type, + stamped with ['db] and ['ocaml] — when [typ] matches the declared type of + [field] (checked with {!Typ.eq} and {!Typ.eq_ocaml}); [None] on type + mismatch *) + val create : 'ref field_ex -> textI18n -> |
