;
};
-switch (ReactDOM.querySelector("#root")) {
-| Some(element) =>
- let root = ReactDOM.Client.createRoot(element);
- ReactDOM.Client.render(root, );
-| None =>
- Js.Console.error("Failed to start React: couldn't find the #root element")
-};
+let () =
+ switch (ReactDOM.querySelector("#root")) {
+ | None =>
+ Js.Console.error("Failed to start React: couldn't find the #root element")
+ | Some(element) =>
+ let root = ReactDOM.Client.createRoot(element);
+ ReactDOM.Client.render(root, );
+ };
diff --git a/src/Speech.re b/src/Speech.re
new file mode 100644
index 0000000..888e142
--- /dev/null
+++ b/src/Speech.re
@@ -0,0 +1,8 @@
+/* Simplest possible bindings for speech synthesis API */
+
+type utterance;
+
+[@mel.new]
+external makeUtterance: string => utterance = "SpeechSynthesisUtterance";
+
+external speak: utterance => unit = "speechSynthesis.speak";
diff --git a/src/dune b/src/dune
index 56c2f22..5f84d72 100644
--- a/src/dune
+++ b/src/dune
@@ -17,7 +17,7 @@
; Dune will look into those dependencies and generate rules with JavaScript targets
; for the modules in those libraries as well.
; Caveat: the libraries need to be specified with `(modes melange)`.
- (libraries reason-react world melange.belt)
+ (libraries reason-react world)
; By default, Dune will include all modules in the folder to the targets. With `modules` field
; we can tweak this default behavior by excluding `hello` from the list of targets of this stanza.
diff --git a/src/world/world.ml b/src/world/World.ml
similarity index 100%
rename from src/world/world.ml
rename to src/world/World.ml