From 64d4a429789fd27b6363de81b17c7048628bdf27 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Fri, 23 Sep 2022 08:38:17 -0700 Subject: [PATCH] autoformat --- implementations/Ocaml/helloworld/_build/.db | Bin 4310 -> 4310 bytes implementations/Ocaml/helloworld/_build/.digest-db | Bin 5480 -> 5480 bytes .../_build/default/bin/.formatted/main.ml | 17 ++++++++---- implementations/Ocaml/helloworld/_build/log | 29 +++++++++++++++++++-- implementations/Ocaml/helloworld/bin/main.ml | 12 ++++----- 5 files changed, 45 insertions(+), 13 deletions(-) diff --git a/implementations/Ocaml/helloworld/_build/.db b/implementations/Ocaml/helloworld/_build/.db index 258ebc14e65a52de4bae7d563cb35e267ac55dc3..08e2657e7c0b81a496a92cdb1bb1ed6c9bae317f 100644 GIT binary patch delta 49 zcmV-10M7r`A=V*~ry}%CQ6>=HEMBr*I)ItGr|m#6PUCG_r$lWN=2PI}{^k<%lYs#t HvFhv(PE;7I delta 49 zcmV-10M7r`A=V*~ry|8ak6zi}$}(&6MxTejT+2W()d1x~V1oX%t^ZW$x8NSElYs#t HvFhv(l&~7J diff --git a/implementations/Ocaml/helloworld/_build/.digest-db b/implementations/Ocaml/helloworld/_build/.digest-db index 4c04e451d1c9c6f9c753821a2427ae657edf89df..fc9d9e1f77f8a7abfab0c637aa8045691dbb3acb 100644 GIT binary patch delta 290 zcmaE%^+Icc8e1sO`xUM`Ch9avou1~_cSf-K#s|llsyn|mIBZ}MU}UmqWK;>Aypd6H z;s+pk%SH&C%XkTa2Aaq?SUEugFf z9}~#Hy3fUv>Zh delta 299 zcmaE%^+Icc8e0gD($ZxO6Lp#tci)LN`x(=+;P+&e^TKBv=564KyD6t%c>0DTBjX}Q zMiuwT3mFwBzI0*?nXJQT3na4`%@{#~X+UgL?&l) zngCf7Ibi30vRQ(Ui3upVkWp{4r+@`V2+&HPX1mFM*yJa#5ZDGZF el | _ -> [] -let () = print_endline "Hello, World!" +let dummy = JoyList [ joy_true; joy_false; j_loop; zero ] + +let rec joy_to_string jt = + match jt with + | JoySymbol sym -> sym + | JoyTrue -> "true" + | JoyFalse -> "false" + | JoyInt i -> string_of_int i + | JoyList el -> "[" ^ String.concat " " (List.map joy_to_string el) ^ "]" + +let () = print_endline (joy_to_string dummy) diff --git a/implementations/Ocaml/helloworld/_build/log b/implementations/Ocaml/helloworld/_build/log index 584df09..d8542db 100644 --- a/implementations/Ocaml/helloworld/_build/log +++ b/implementations/Ocaml/helloworld/_build/log @@ -1,9 +1,9 @@ -# dune exec helloworld +# dune build --auto-promote @fmt # OCAMLPARAM: unset # Shared cache: disabled # Workspace root: /usr/home/sforman/src/Joypy/implementations/Ocaml/helloworld # Auto-detected concurrency: 8 -$ /usr/home/sforman/.opam/default/bin/ocamlc.opt -config > /tmp/dune_31d5e4_output +$ /usr/home/sforman/.opam/default/bin/ocamlc.opt -config > /tmp/dune_9b5fa0_output # Dune context: # { name = "default" # ; kind = "default" @@ -116,3 +116,28 @@ $ /usr/home/sforman/.opam/default/bin/ocamlc.opt -config > /tmp/dune_31d5e4_outp # ; windows_unicode = false # } # } +$ (cd _build/default && /usr/home/sforman/.opam/default/bin/ocamlformat --impl bin/main.ml) > _build/default/bin/.formatted/main.ml +$ /usr/local/bin/git --no-pager diff --no-index --color=always -u _build/default/bin/main.ml _build/default/bin/.formatted/main.ml +> diff --git a/_build/default/bin/main.ml b/_build/default/bin/.formatted/main.ml +> index 2fcd04c..fd4a636 100644 +> --- a/_build/default/bin/main.ml +> +++ b/_build/default/bin/.formatted/main.ml +> @@ -14,11 +14,11 @@ let zero = JoyInt 0 +> let dummy = JoyList [ joy_true; joy_false; j_loop; zero ] +> +> let rec joy_to_string jt = +> - match jt with +> - | JoySymbol sym -> sym +> - | JoyTrue -> "true" +> - | JoyFalse -> "false" +> - | JoyInt i -> string_of_int i +> - | JoyList el -> "[" ^ (String.concat " " (List.map joy_to_string el)) ^ "]";; +> + match jt with +> + | JoySymbol sym -> sym +> + | JoyTrue -> "true" +> + | JoyFalse -> "false" +> + | JoyInt i -> string_of_int i +> + | JoyList el -> "[" ^ String.concat " " (List.map joy_to_string el) ^ "]" +> +> let () = print_endline (joy_to_string dummy) +[1] diff --git a/implementations/Ocaml/helloworld/bin/main.ml b/implementations/Ocaml/helloworld/bin/main.ml index 2fcd04c..fd4a636 100644 --- a/implementations/Ocaml/helloworld/bin/main.ml +++ b/implementations/Ocaml/helloworld/bin/main.ml @@ -14,11 +14,11 @@ let zero = JoyInt 0 let dummy = JoyList [ joy_true; joy_false; j_loop; zero ] let rec joy_to_string jt = - match jt with - | JoySymbol sym -> sym - | JoyTrue -> "true" - | JoyFalse -> "false" - | JoyInt i -> string_of_int i - | JoyList el -> "[" ^ (String.concat " " (List.map joy_to_string el)) ^ "]";; + match jt with + | JoySymbol sym -> sym + | JoyTrue -> "true" + | JoyFalse -> "false" + | JoyInt i -> string_of_int i + | JoyList el -> "[" ^ String.concat " " (List.map joy_to_string el) ^ "]" let () = print_endline (joy_to_string dummy) -- 2.11.0