summaryrefslogtreecommitdiff
path: root/lib/value/data.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-20 18:47:26 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-20 18:47:26 +0100
commitfa4970bf1b74f3fa0b2f63cbd461d98c251dc0f0 (patch)
tree577a41415e67510f08f43fc48c794c36a10f6e80 /lib/value/data.ml
parentb05e2d2be7be28ee6c577671002797cf9abaf177 (diff)
Updated the model for representing ocaml types in the application type
Diffstat (limited to 'lib/value/data.ml')
-rw-r--r--lib/value/data.ml22
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/value/data.ml b/lib/value/data.ml
index 7cbc00f..f0e321e 100644
--- a/lib/value/data.ml
+++ b/lib/value/data.ml
@@ -7,22 +7,18 @@
The type is parameterized over the type of the data held (['a]: the DB
representation of the field, e.g. [string option] or [int64 option]) and
over ['t], the target of the field for references — a reference is held as
- an [int64] (the id of the target row), while ['t] records what it points
- to. The field type {!Model.Typ.t} stays in the model package; only the data
+ an [int64] (the id of the target row), while ['t] records what it points to.
+ The field type {!Model.Typ.t} stays in the model package; only the data
itself lives here. *)
-type ('a, 't) data =
+type ('ocaml, 't) data =
| None
- | V : ('a, 't) Model.Typ.t * 'a -> ('a, 't) data
- | Seq : (int64, 't) Model.Typ.t * int64 Seq.t -> (int64 Seq.t, 't) data
+ | V : ('db, 'ocaml, 't) Model.Typ.t * 'ocaml -> ('ocaml, 't) data
-let none : ('a, 't) data = None
+let none : ('ocaml, 't) data = None
-let v : ('a, 't) Model.Typ.t * 'a -> ('a, 't) data =
- fun (typ, value) -> V (typ, value)
+let v : ('db, 'ocaml, 't) Model.Typ.t * 'ocaml -> ('ocaml, 't) data =
+ fun (typ, value) -> V (typ, value)
-let seq : (int64, 't) Model.Typ.t * int64 Seq.t -> (int64 Seq.t, 't) data =
- fun (typ, values) -> Seq (typ, values)
+type 't any = Any : ('ocaml, 't) data -> 't any [@@unboxed]
-type 't any = Any : ('a, 't) data -> 't any [@@unboxed]
-
-let any : ('a, 't) data -> 't any = fun data -> Any data
+let any : ('ocaml, 't) data -> 't any = fun data -> Any data