From a4775c617b49690e5befc9f27f60a4d312f3c3c6 Mon Sep 17 00:00:00 2001 From: Gabriel Santamaria Date: Wed, 8 May 2024 03:31:16 +0200 Subject: [PATCH] Adding .ocamlformat file at the root of the project Signed-off-by: Gabriel Santamaria --- .github/workflows/workflow.yml | 3 ++- .ocamlformat | 3 +++ doc/ocaml/playground.ml | 9 +++++---- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .ocamlformat diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b16110c..aae8383 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -48,7 +48,8 @@ jobs: - name: Install OCaml uses: ocaml/setup-ocaml@v2 with: - ocaml-compiler: "4.14" + ocaml-compiler: "5.1" + dune-cache: true - uses: ocaml/setup-ocaml/lint-fmt@v2 diff --git a/.ocamlformat b/.ocamlformat new file mode 100644 index 0000000..189eda3 --- /dev/null +++ b/.ocamlformat @@ -0,0 +1,3 @@ +profile = ocamlformat +wrap-comments = true +version = 0.26.1 diff --git a/doc/ocaml/playground.ml b/doc/ocaml/playground.ml index 81aa4bf..7544e2d 100644 --- a/doc/ocaml/playground.ml +++ b/doc/ocaml/playground.ml @@ -22,7 +22,7 @@ open Js_of_ocaml -let exec_string (str: string) = +let exec_string (str : string) = let state = Lice.LState.empty in let state = Lice.LState.do_string state str in state @@ -30,6 +30,7 @@ let exec_string (str: string) = let _ = Js.export "Lice" (object%js - method doString (code: string) = exec_string code - method bytecodeViewer = Lice.bytecode_viewer - end) + method doString (code : string) = exec_string code + + method bytecodeViewer = Lice.bytecode_viewer + end )