From 0f5567c49b510e03197f46109a896d3eba352273 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Sun, 14 Jul 2019 11:54:34 +0800 Subject: [PATCH] refactor --- toplevel/lib/dune | 2 +- toplevel/lib/js_of_ocaml_toplevel.ml | 2 ++ toplevel/lib/{ => lwt}/jsooTopAsynchronous.ml | 1 + toplevel/lib/{ => lwt}/jsooTopAsynchronous.mli | 1 + toplevel/lib/{ => lwt}/jsooTopWorker.ml | 1 + toplevel/lib/{ => lwt}/jsooTopWorker.mli | 0 toplevel/lib/{ => lwt}/jsooTopWorkerIntf.ml | 2 +- toplevel/lib/{ => lwt}/jsooTopWorkerIntf.mli | 2 +- 8 files changed, 8 insertions(+), 3 deletions(-) rename toplevel/lib/{ => lwt}/jsooTopAsynchronous.ml (99%) rename toplevel/lib/{ => lwt}/jsooTopAsynchronous.mli (98%) rename toplevel/lib/{ => lwt}/jsooTopWorker.ml (99%) rename toplevel/lib/{ => lwt}/jsooTopWorker.mli (100%) rename toplevel/lib/{ => lwt}/jsooTopWorkerIntf.ml (98%) rename toplevel/lib/{ => lwt}/jsooTopWorkerIntf.mli (98%) diff --git a/toplevel/lib/dune b/toplevel/lib/dune index 6198b423e2..fda59845e7 100644 --- a/toplevel/lib/dune +++ b/toplevel/lib/dune @@ -3,7 +3,7 @@ (public_name js_of_ocaml-toplevel) (synopsis "Js_of_ocaml toplevel library") (wrapped (transition "Will be removed past 2019-04-01")) - (libraries lwt + (libraries js_of_ocaml-compiler js_of_ocaml bytes compiler-libs.bytecomp compiler-libs.toplevel) (preprocess (pps js_of_ocaml-ppx))) diff --git a/toplevel/lib/js_of_ocaml_toplevel.ml b/toplevel/lib/js_of_ocaml_toplevel.ml index 476e5cb3dc..4653b7c825 100644 --- a/toplevel/lib/js_of_ocaml_toplevel.ml +++ b/toplevel/lib/js_of_ocaml_toplevel.ml @@ -18,3 +18,5 @@ *) module JsooTop = JsooTop +module JsooTopWrapped = JsooTopWrapped +module JsooTopIntf = JsooTopIntf diff --git a/toplevel/lib/jsooTopAsynchronous.ml b/toplevel/lib/lwt/jsooTopAsynchronous.ml similarity index 99% rename from toplevel/lib/jsooTopAsynchronous.ml rename to toplevel/lib/lwt/jsooTopAsynchronous.ml index 0dda8ed9be..1f0f9d4e95 100644 --- a/toplevel/lib/jsooTopAsynchronous.ml +++ b/toplevel/lib/lwt/jsooTopAsynchronous.ml @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) open Js_of_ocaml +open! Js_of_ocaml_toplevel open JsooTopWorkerIntf type 'a result = 'a JsooTopWrapped.result Lwt.t diff --git a/toplevel/lib/jsooTopAsynchronous.mli b/toplevel/lib/lwt/jsooTopAsynchronous.mli similarity index 98% rename from toplevel/lib/jsooTopAsynchronous.mli rename to toplevel/lib/lwt/jsooTopAsynchronous.mli index 852acac4a2..444b282578 100644 --- a/toplevel/lib/jsooTopAsynchronous.mli +++ b/toplevel/lib/lwt/jsooTopAsynchronous.mli @@ -16,6 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open! Js_of_ocaml_toplevel type toplevel diff --git a/toplevel/lib/jsooTopWorker.ml b/toplevel/lib/lwt/jsooTopWorker.ml similarity index 99% rename from toplevel/lib/jsooTopWorker.ml rename to toplevel/lib/lwt/jsooTopWorker.ml index 9e07953f9b..8f7f750089 100644 --- a/toplevel/lib/jsooTopWorker.ml +++ b/toplevel/lib/lwt/jsooTopWorker.ml @@ -18,6 +18,7 @@ *) open Js_of_ocaml +open! Js_of_ocaml_toplevel open JsooTopWorkerIntf type 'a return = diff --git a/toplevel/lib/jsooTopWorker.mli b/toplevel/lib/lwt/jsooTopWorker.mli similarity index 100% rename from toplevel/lib/jsooTopWorker.mli rename to toplevel/lib/lwt/jsooTopWorker.mli diff --git a/toplevel/lib/jsooTopWorkerIntf.ml b/toplevel/lib/lwt/jsooTopWorkerIntf.ml similarity index 98% rename from toplevel/lib/jsooTopWorkerIntf.ml rename to toplevel/lib/lwt/jsooTopWorkerIntf.ml index 6cc5740c6f..244d88dac0 100644 --- a/toplevel/lib/jsooTopWorkerIntf.ml +++ b/toplevel/lib/lwt/jsooTopWorkerIntf.ml @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - +open! Js_of_ocaml_toplevel open Js_of_ocaml (** Types of the messages exchanged with a toplevel in a Web Worker. *) diff --git a/toplevel/lib/jsooTopWorkerIntf.mli b/toplevel/lib/lwt/jsooTopWorkerIntf.mli similarity index 98% rename from toplevel/lib/jsooTopWorkerIntf.mli rename to toplevel/lib/lwt/jsooTopWorkerIntf.mli index 6cc5740c6f..244d88dac0 100644 --- a/toplevel/lib/jsooTopWorkerIntf.mli +++ b/toplevel/lib/lwt/jsooTopWorkerIntf.mli @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - +open! Js_of_ocaml_toplevel open Js_of_ocaml (** Types of the messages exchanged with a toplevel in a Web Worker. *)