From b941c8c059012d6497553f564fe3cb5cd7b6f75c Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 9 Apr 2021 10:57:49 +0200 Subject: Update build --- css.opam | 26 ++++++++++++++++++++++++++ lib/js_lib/array.ml | 14 ++++++++++++++ lib/js_lib/dune | 9 +++++++++ viz.js.opam | 25 +++++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100755 css.opam create mode 100755 lib/js_lib/array.ml create mode 100755 lib/js_lib/dune create mode 100755 viz.js.opam diff --git a/css.opam b/css.opam new file mode 100755 index 0000000..2367cac --- /dev/null +++ b/css.opam @@ -0,0 +1,26 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "CSS Merger" +maintainer: ["Sébastien Dailly"] +authors: ["Sébastien Dailly"] +depends: [ + "dune" {>= "2.7"} + "ocaml" {>= "4.10.0"} + "brr" {>= "0.0.1"} + "css-parser" {>= "0.2.4"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] diff --git a/lib/js_lib/array.ml b/lib/js_lib/array.ml new file mode 100755 index 0000000..e55f1e9 --- /dev/null +++ b/lib/js_lib/array.ml @@ -0,0 +1,14 @@ +open Js_of_ocaml + +(** Compare two arrays *) +let compare + : f:('a -> 'a -> bool Js.t) -> 'a Js.js_array Js.t -> 'a Js.js_array Js.t -> bool Js.t + = fun ~f arr1 arr2 -> + if arr1##.length <> arr2##.length then + Js._false + else + arr1##every + (Js.wrap_callback @@ fun elem i _ -> + Js.Optdef.case (Js.array_get arr2 i) + (fun () -> Js._false) + (fun elem2 -> f elem elem2)) diff --git a/lib/js_lib/dune b/lib/js_lib/dune new file mode 100755 index 0000000..131a4bf --- /dev/null +++ b/lib/js_lib/dune @@ -0,0 +1,9 @@ +(library + (name js_lib) + (libraries + brr + brr.note + js_of_ocaml + ) + (preprocess (pps js_of_ocaml-ppx)) +) diff --git a/viz.js.opam b/viz.js.opam new file mode 100755 index 0000000..11b3a4f --- /dev/null +++ b/viz.js.opam @@ -0,0 +1,25 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "Graph viewer" +maintainer: ["Sébastien Dailly"] +authors: ["Sébastien Dailly"] +depends: [ + "dune" {>= "2.7"} + "ocaml" {>= "4.10.0"} + "js_of_ocaml-lwt" {>= "3.8.0"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] -- cgit v1.2.3