diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 15:54:32 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:43:33 +0100 |
commit | f4a59ed2811d4dca2daad58d083078c01488dd11 (patch) | |
tree | 85a5ad0e6bf7bdd07834a5cf565d8a5992844f5f /editor/j | |
parent | cdd83641518d9b20e81f71e6a30bfe73866df2e8 (diff) |
Added prosemirror deps
Diffstat (limited to 'editor/j')
-rwxr-xr-x | editor/j/dune | 7 | ||||
-rwxr-xr-x | editor/j/j.ml | 47 | ||||
-rwxr-xr-x | editor/j/j.mli | 32 |
3 files changed, 0 insertions, 86 deletions
diff --git a/editor/j/dune b/editor/j/dune deleted file mode 100755 index 56e6691..0000000 --- a/editor/j/dune +++ /dev/null @@ -1,7 +0,0 @@ -(library - (name j) - (libraries - brr - js_of_ocaml - ) - ) diff --git a/editor/j/j.ml b/editor/j/j.ml deleted file mode 100755 index 96b22e0..0000000 --- a/editor/j/j.ml +++ /dev/null @@ -1,47 +0,0 @@ -type ('a, 'b) prop = Jv.prop' - -let prop - : string -> ('a, 'b) prop - = Jstr.of_string - -let get - : 'a -> ('a, 'b) prop -> 'b option - = fun obj prop -> - Jv.get' (Jv.Id.to_jv obj) prop - |> Jv.to_option Jv.Id.of_jv - -let set - : 'a -> ('a, 'b) prop -> 'b -> unit - = fun obj prop value -> - Jv.set' - (Jv.Id.to_jv obj) - prop - (Jv.Id.to_jv value) - -(* Objects *) - -type 'a constr = (Jstr.t * Jv.t) - -let c - : ('a, 'b) prop -> 'b -> 'a constr - = fun prop v -> - (prop, Jv.Id.to_jv v) - -let obj - : 'a constr Array.t -> 'a - = fun props -> - Jv.Id.of_jv @@ Jv.obj' props - -(* Arrays *) - -type 'a array = Jv.t - -let to_array - : 'a array -> 'a Array.t - = fun arr -> - Jv.to_array Jv.Id.of_jv arr - -let of_array - : 'a Array.t -> 'a array - = fun arr -> - Jv.of_array Jv.Id.to_jv arr diff --git a/editor/j/j.mli b/editor/j/j.mli deleted file mode 100755 index 796bb9d..0000000 --- a/editor/j/j.mli +++ /dev/null @@ -1,32 +0,0 @@ -(** The type properties *) -type ('a, 'b) prop - -val prop - : string -> ('a, 'b) prop - -val get - : 'a -> ('a, 'b) prop -> 'b option - -val set - : 'a -> ('a, 'b) prop -> 'b -> unit - - -(* Arrays *) - -type 'a array - -val to_array - : 'a array -> 'a Array.t - -val of_array - : 'a Array.t -> 'a array - -(* Object constructor *) - -type 'a constr - -val c - : ('a, 'b) prop -> 'b -> 'a constr - -val obj - : 'a constr Array.t -> 'a |