diff --git a/implementations/Ocaml/_build/log b/implementations/Ocaml/_build/log new file mode 100644 index 0000000..53990fd --- /dev/null +++ b/implementations/Ocaml/_build/log @@ -0,0 +1,5 @@ +# dune init project helloworld +# OCAMLPARAM: unset +# Shared cache: disabled +# Workspace root: /usr/home/sforman/src/Joypy/implementations/Ocaml +# Auto-detected concurrency: 8 diff --git a/implementations/Ocaml/helloworld/.ocamlformat b/implementations/Ocaml/helloworld/.ocamlformat new file mode 100644 index 0000000..1cc425f --- /dev/null +++ b/implementations/Ocaml/helloworld/.ocamlformat @@ -0,0 +1 @@ +version = 0.23.0 diff --git a/implementations/Ocaml/helloworld/_build/.actions/default/bin/.formatted/fmt-fd26e5eb62e175416c4175b88399d8b8 b/implementations/Ocaml/helloworld/_build/.actions/default/bin/.formatted/fmt-fd26e5eb62e175416c4175b88399d8b8 new file mode 100644 index 0000000..e69de29 diff --git a/implementations/Ocaml/helloworld/_build/.actions/default/lib/.formatted/fmt-ee995a30c73243018f2b8e8d77ee7155 b/implementations/Ocaml/helloworld/_build/.actions/default/lib/.formatted/fmt-ee995a30c73243018f2b8e8d77ee7155 new file mode 100644 index 0000000..e69de29 diff --git a/implementations/Ocaml/helloworld/_build/.actions/default/test/.formatted/fmt-440d2cb7bd964d5a3bd7ffdd17832fb9 b/implementations/Ocaml/helloworld/_build/.actions/default/test/.formatted/fmt-440d2cb7bd964d5a3bd7ffdd17832fb9 new file mode 100644 index 0000000..e69de29 diff --git a/implementations/Ocaml/helloworld/_build/.actions/default/test/.formatted/fmt-922d6f7045e3dec7e6e4a822d20b6eb9 b/implementations/Ocaml/helloworld/_build/.actions/default/test/.formatted/fmt-922d6f7045e3dec7e6e4a822d20b6eb9 new file mode 100644 index 0000000..e69de29 diff --git a/implementations/Ocaml/helloworld/_build/.db b/implementations/Ocaml/helloworld/_build/.db new file mode 100644 index 0000000..258ebc1 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/.db differ diff --git a/implementations/Ocaml/helloworld/_build/.digest-db b/implementations/Ocaml/helloworld/_build/.digest-db new file mode 100644 index 0000000..4c04e45 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/.digest-db differ diff --git a/implementations/Ocaml/helloworld/_build/.filesystem-clock b/implementations/Ocaml/helloworld/_build/.filesystem-clock new file mode 100644 index 0000000..c61f4a7 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/.filesystem-clock @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/implementations/Ocaml/helloworld/_build/default/.dune/configurator b/implementations/Ocaml/helloworld/_build/default/.dune/configurator new file mode 100644 index 0000000..f5c1f44 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/.dune/configurator @@ -0,0 +1,2 @@ +(ocamlc /usr/home/sforman/.opam/default/bin/ocamlc.opt) +(ocaml_config_vars (afl_instrument false) (architecture amd64) (asm "cc -c") (asm_cfi_supported true) (ast_impl_magic_number Caml1999M031) (ast_intf_magic_number Caml1999N031) (bytecomp_c_compiler "cc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 ") (bytecomp_c_libraries "-lm -lpthread") (c_compiler cc) (ccomp_type cc) (cma_magic_number Caml1999A031) (cmi_magic_number Caml1999I031) (cmo_magic_number Caml1999O031) (cmt_magic_number Caml1999T031) (cmx_magic_number Caml1999Y031) (cmxa_magic_number Caml1999Z031) (cmxs_magic_number Caml1999D031) (default_executable_name a.out) (default_safe_string true) (exec_magic_number Caml1999X031) (ext_asm .s) (ext_dll .so) (ext_exe "") (ext_lib .a) (ext_obj .o) (flambda false) (flat_float_array true) (function_sections true) (host x86_64-unknown-freebsd12.3) (int_size 63) (linear_magic_number Caml1999L031) (model default) (naked_pointers true) (native_c_compiler "cc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 ") (native_c_libraries "-lm ") (native_pack_linker "ld -r -o ") (ocamlc_cflags "-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ") (ocamlc_cppflags "-D_FILE_OFFSET_BITS=64 ") (ocamlopt_cflags "-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC ") (ocamlopt_cppflags "-D_FILE_OFFSET_BITS=64 ") (os_type Unix) (ranlib ranlib) (safe_string true) (standard_library /usr/home/sforman/.opam/default/lib/ocaml) (standard_library_default /usr/home/sforman/.opam/default/lib/ocaml) (supports_shared_libraries true) (system freebsd) (systhread_supported true) (target x86_64-unknown-freebsd12.3) (version 4.14.0) (windows_unicode false) (with_frame_pointers false) (word_size 64)) diff --git a/implementations/Ocaml/helloworld/_build/default/.dune/configurator.v2 b/implementations/Ocaml/helloworld/_build/default/.dune/configurator.v2 new file mode 100644 index 0000000..953a1f1 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/.dune/configurator.v2 @@ -0,0 +1 @@ +((6:ocamlc46:/usr/home/sforman/.opam/default/bin/ocamlc.opt)(17:ocaml_config_vars((14:afl_instrument5:false)(12:architecture5:amd64)(3:asm5:cc -c)(17:asm_cfi_supported4:true)(21:ast_impl_magic_number12:Caml1999M031)(21:ast_intf_magic_number12:Caml1999N031)(19:bytecomp_c_compiler75:cc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 )(20:bytecomp_c_libraries14:-lm -lpthread)(10:c_compiler2:cc)(10:ccomp_type2:cc)(16:cma_magic_number12:Caml1999A031)(16:cmi_magic_number12:Caml1999I031)(16:cmo_magic_number12:Caml1999O031)(16:cmt_magic_number12:Caml1999T031)(16:cmx_magic_number12:Caml1999Y031)(17:cmxa_magic_number12:Caml1999Z031)(17:cmxs_magic_number12:Caml1999D031)(23:default_executable_name5:a.out)(19:default_safe_string4:true)(17:exec_magic_number12:Caml1999X031)(7:ext_asm2:.s)(7:ext_dll3:.so)(7:ext_exe0:)(7:ext_lib2:.a)(7:ext_obj2:.o)(7:flambda5:false)(16:flat_float_array4:true)(17:function_sections4:true)(4:host26:x86_64-unknown-freebsd12.3)(8:int_size2:63)(19:linear_magic_number12:Caml1999L031)(5:model7:default)(14:naked_pointers4:true)(17:native_c_compiler75:cc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 )(18:native_c_libraries4:-lm )(18:native_pack_linker9:ld -r -o )(13:ocamlc_cflags48:-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC )(15:ocamlc_cppflags23:-D_FILE_OFFSET_BITS=64 )(15:ocamlopt_cflags48:-O2 -fno-strict-aliasing -fwrapv -pthread -fPIC )(17:ocamlopt_cppflags23:-D_FILE_OFFSET_BITS=64 )(7:os_type4:Unix)(6:ranlib6:ranlib)(11:safe_string4:true)(16:standard_library41:/usr/home/sforman/.opam/default/lib/ocaml)(24:standard_library_default41:/usr/home/sforman/.opam/default/lib/ocaml)(25:supports_shared_libraries4:true)(6:system7:freebsd)(19:systhread_supported4:true)(6:target26:x86_64-unknown-freebsd12.3)(7:version6:4.14.0)(15:windows_unicode5:false)(19:with_frame_pointers5:false)(9:word_size2:64)))) \ No newline at end of file diff --git a/implementations/Ocaml/helloworld/_build/default/.ocamlformat b/implementations/Ocaml/helloworld/_build/default/.ocamlformat new file mode 100644 index 0000000..1cc425f --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/.ocamlformat @@ -0,0 +1 @@ +version = 0.23.0 diff --git a/implementations/Ocaml/helloworld/_build/default/META.helloworld b/implementations/Ocaml/helloworld/_build/default/META.helloworld new file mode 100644 index 0000000..e69de29 diff --git a/implementations/Ocaml/helloworld/_build/default/bin/.formatted/dune b/implementations/Ocaml/helloworld/_build/default/bin/.formatted/dune new file mode 100644 index 0000000..a971f63 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/bin/.formatted/dune @@ -0,0 +1,4 @@ +(executable + (public_name helloworld) + (name main) + (libraries helloworld)) diff --git a/implementations/Ocaml/helloworld/_build/default/bin/.formatted/main.ml b/implementations/Ocaml/helloworld/_build/default/bin/.formatted/main.ml new file mode 100644 index 0000000..76bc33e --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/bin/.formatted/main.ml @@ -0,0 +1,17 @@ +type joy_type = + | JoySymbol of string + | JoyTrue + | JoyFalse + | JoyInt of int + | JoyList of joy_type list + +type joy_list = joy_type list + +let joy_true = JoyTrue +let joy_false = JoyFalse +let j_loop = JoySymbol "loop" +let empty_list = JoyList [] +let zero = JoyInt 0 +let dummy = [ joy_true; joy_false; j_loop; zero ] +let list_get jt = match jt with JoyList el -> el | _ -> [] +let () = print_endline "Hello, World!" diff --git a/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmi b/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmi new file mode 100644 index 0000000..140fe15 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmi differ diff --git a/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmti b/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmti new file mode 100644 index 0000000..7070567 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/byte/dune__exe__Main.cmti differ diff --git a/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/native/dune__exe__Main.cmx b/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/native/dune__exe__Main.cmx new file mode 100644 index 0000000..297786f Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/native/dune__exe__Main.cmx differ diff --git a/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/native/dune__exe__Main.o b/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/native/dune__exe__Main.o new file mode 100644 index 0000000..ded69d3 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/bin/.main.eobjs/native/dune__exe__Main.o differ diff --git a/implementations/Ocaml/helloworld/_build/default/bin/.merlin-conf/exe-main b/implementations/Ocaml/helloworld/_build/default/bin/.merlin-conf/exe-main new file mode 100644 index 0000000..223c6ed Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/bin/.merlin-conf/exe-main differ diff --git a/implementations/Ocaml/helloworld/_build/default/bin/dune b/implementations/Ocaml/helloworld/_build/default/bin/dune new file mode 100644 index 0000000..a971f63 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/bin/dune @@ -0,0 +1,4 @@ +(executable + (public_name helloworld) + (name main) + (libraries helloworld)) diff --git a/implementations/Ocaml/helloworld/_build/default/bin/main.exe b/implementations/Ocaml/helloworld/_build/default/bin/main.exe new file mode 100755 index 0000000..829dfb9 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/bin/main.exe differ diff --git a/implementations/Ocaml/helloworld/_build/default/bin/main.ml b/implementations/Ocaml/helloworld/_build/default/bin/main.ml new file mode 100644 index 0000000..2fcd04c --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/bin/main.ml @@ -0,0 +1,24 @@ +type joy_type = + | JoySymbol of string + | JoyTrue + | JoyFalse + | JoyInt of int + | JoyList of joy_type list + +(* type joy_list = joy_type list *) + +let joy_true = JoyTrue +let joy_false = JoyFalse +let j_loop = JoySymbol "loop" +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)) ^ "]";; + +let () = print_endline (joy_to_string dummy) diff --git a/implementations/Ocaml/helloworld/_build/default/bin/main.mli b/implementations/Ocaml/helloworld/_build/default/bin/main.mli new file mode 100644 index 0000000..335ae1f --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/bin/main.mli @@ -0,0 +1 @@ +(* Auto-generated by Dune *) \ No newline at end of file diff --git a/implementations/Ocaml/helloworld/_build/default/helloworld.dune-package b/implementations/Ocaml/helloworld/_build/default/helloworld.dune-package new file mode 100644 index 0000000..1af46af --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/helloworld.dune-package @@ -0,0 +1,4 @@ +(lang dune 3.4) +(name helloworld) +(sections (lib .) (bin ../../bin)) +(files (lib (META dune-package opam)) (bin (helloworld))) diff --git a/implementations/Ocaml/helloworld/_build/default/helloworld.install b/implementations/Ocaml/helloworld/_build/default/helloworld.install new file mode 100644 index 0000000..35b607d --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/helloworld.install @@ -0,0 +1,8 @@ +lib: [ + "_build/install/default/lib/helloworld/META" + "_build/install/default/lib/helloworld/dune-package" + "_build/install/default/lib/helloworld/opam" +] +bin: [ + "_build/install/default/bin/helloworld" +] diff --git a/implementations/Ocaml/helloworld/_build/default/helloworld.opam b/implementations/Ocaml/helloworld/_build/default/helloworld.opam new file mode 100644 index 0000000..e8e1f76 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/helloworld.opam @@ -0,0 +1,31 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "A short synopsis" +description: "A longer description" +maintainer: ["Maintainer Name"] +authors: ["Author Name"] +license: "LICENSE" +tags: ["topics" "to describe" "your" "project"] +homepage: "https://github.com/username/reponame" +doc: "https://url/to/documentation" +bug-reports: "https://github.com/username/reponame/issues" +depends: [ + "ocaml" + "dune" {>= "3.4"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/username/reponame.git" diff --git a/implementations/Ocaml/helloworld/_build/default/lib/.formatted/dune b/implementations/Ocaml/helloworld/_build/default/lib/.formatted/dune new file mode 100644 index 0000000..ab364d0 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/lib/.formatted/dune @@ -0,0 +1,2 @@ +(library + (name helloworld)) diff --git a/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/byte/helloworld.cmi b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/byte/helloworld.cmi new file mode 100644 index 0000000..cb4103b Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/byte/helloworld.cmi differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/byte/helloworld.cmo b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/byte/helloworld.cmo new file mode 100644 index 0000000..96ccc77 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/byte/helloworld.cmo differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/byte/helloworld.cmt b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/byte/helloworld.cmt new file mode 100644 index 0000000..5f6eafc Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/byte/helloworld.cmt differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/native/helloworld.cmx b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/native/helloworld.cmx new file mode 100644 index 0000000..6ba3666 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/native/helloworld.cmx differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/native/helloworld.o b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/native/helloworld.o new file mode 100644 index 0000000..efe4b6f Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/.helloworld.objs/native/helloworld.o differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/.merlin-conf/lib-helloworld b/implementations/Ocaml/helloworld/_build/default/lib/.merlin-conf/lib-helloworld new file mode 100644 index 0000000..54f6b7b Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/.merlin-conf/lib-helloworld differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/dune b/implementations/Ocaml/helloworld/_build/default/lib/dune new file mode 100644 index 0000000..ab364d0 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/lib/dune @@ -0,0 +1,2 @@ +(library + (name helloworld)) diff --git a/implementations/Ocaml/helloworld/_build/default/lib/helloworld.a b/implementations/Ocaml/helloworld/_build/default/lib/helloworld.a new file mode 100644 index 0000000..9806a9a Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/helloworld.a differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/helloworld.cma b/implementations/Ocaml/helloworld/_build/default/lib/helloworld.cma new file mode 100644 index 0000000..e950445 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/helloworld.cma differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/helloworld.cmxa b/implementations/Ocaml/helloworld/_build/default/lib/helloworld.cmxa new file mode 100644 index 0000000..9b1f949 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/helloworld.cmxa differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/helloworld.cmxs b/implementations/Ocaml/helloworld/_build/default/lib/helloworld.cmxs new file mode 100755 index 0000000..c215d3d Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/lib/helloworld.cmxs differ diff --git a/implementations/Ocaml/helloworld/_build/default/lib/helloworld.ml-gen b/implementations/Ocaml/helloworld/_build/default/lib/helloworld.ml-gen new file mode 100644 index 0000000..e69de29 diff --git a/implementations/Ocaml/helloworld/_build/default/test/.formatted/dune b/implementations/Ocaml/helloworld/_build/default/test/.formatted/dune new file mode 100644 index 0000000..5484c29 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/test/.formatted/dune @@ -0,0 +1,2 @@ +(test + (name helloworld)) diff --git a/implementations/Ocaml/helloworld/_build/default/test/.formatted/helloworld.ml b/implementations/Ocaml/helloworld/_build/default/test/.formatted/helloworld.ml new file mode 100644 index 0000000..e69de29 diff --git a/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/byte/dune__exe__Helloworld.cmi b/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/byte/dune__exe__Helloworld.cmi new file mode 100644 index 0000000..6a343d0 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/byte/dune__exe__Helloworld.cmi differ diff --git a/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/byte/dune__exe__Helloworld.cmti b/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/byte/dune__exe__Helloworld.cmti new file mode 100644 index 0000000..cbd73c8 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/byte/dune__exe__Helloworld.cmti differ diff --git a/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/native/dune__exe__Helloworld.cmx b/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/native/dune__exe__Helloworld.cmx new file mode 100644 index 0000000..fa60555 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/native/dune__exe__Helloworld.cmx differ diff --git a/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/native/dune__exe__Helloworld.o b/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/native/dune__exe__Helloworld.o new file mode 100644 index 0000000..26f3d1f Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/test/.helloworld.eobjs/native/dune__exe__Helloworld.o differ diff --git a/implementations/Ocaml/helloworld/_build/default/test/.merlin-conf/exe-helloworld b/implementations/Ocaml/helloworld/_build/default/test/.merlin-conf/exe-helloworld new file mode 100644 index 0000000..7544e91 Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/test/.merlin-conf/exe-helloworld differ diff --git a/implementations/Ocaml/helloworld/_build/default/test/dune b/implementations/Ocaml/helloworld/_build/default/test/dune new file mode 100644 index 0000000..5484c29 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/test/dune @@ -0,0 +1,2 @@ +(test + (name helloworld)) diff --git a/implementations/Ocaml/helloworld/_build/default/test/helloworld.exe b/implementations/Ocaml/helloworld/_build/default/test/helloworld.exe new file mode 100755 index 0000000..d1b926a Binary files /dev/null and b/implementations/Ocaml/helloworld/_build/default/test/helloworld.exe differ diff --git a/implementations/Ocaml/helloworld/_build/default/test/helloworld.ml b/implementations/Ocaml/helloworld/_build/default/test/helloworld.ml new file mode 100644 index 0000000..e69de29 diff --git a/implementations/Ocaml/helloworld/_build/default/test/helloworld.mli b/implementations/Ocaml/helloworld/_build/default/test/helloworld.mli new file mode 100644 index 0000000..335ae1f --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/default/test/helloworld.mli @@ -0,0 +1 @@ +(* Auto-generated by Dune *) \ No newline at end of file diff --git a/implementations/Ocaml/helloworld/_build/install/default/bin/helloworld b/implementations/Ocaml/helloworld/_build/install/default/bin/helloworld new file mode 120000 index 0000000..9cc466a --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/install/default/bin/helloworld @@ -0,0 +1 @@ +../../../default/bin/main.exe \ No newline at end of file diff --git a/implementations/Ocaml/helloworld/_build/install/default/lib/helloworld/META b/implementations/Ocaml/helloworld/_build/install/default/lib/helloworld/META new file mode 120000 index 0000000..9169def --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/install/default/lib/helloworld/META @@ -0,0 +1 @@ +../../../../default/META.helloworld \ No newline at end of file diff --git a/implementations/Ocaml/helloworld/_build/install/default/lib/helloworld/dune-package b/implementations/Ocaml/helloworld/_build/install/default/lib/helloworld/dune-package new file mode 120000 index 0000000..f74829f --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/install/default/lib/helloworld/dune-package @@ -0,0 +1 @@ +../../../../default/helloworld.dune-package \ No newline at end of file diff --git a/implementations/Ocaml/helloworld/_build/install/default/lib/helloworld/opam b/implementations/Ocaml/helloworld/_build/install/default/lib/helloworld/opam new file mode 120000 index 0000000..b74d871 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/install/default/lib/helloworld/opam @@ -0,0 +1 @@ +../../../../default/helloworld.opam \ No newline at end of file diff --git a/implementations/Ocaml/helloworld/_build/log b/implementations/Ocaml/helloworld/_build/log new file mode 100644 index 0000000..584df09 --- /dev/null +++ b/implementations/Ocaml/helloworld/_build/log @@ -0,0 +1,118 @@ +# dune exec helloworld +# 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 +# Dune context: +# { name = "default" +# ; kind = "default" +# ; profile = Dev +# ; merlin = true +# ; for_host = None +# ; fdo_target_exe = None +# ; build_dir = "default" +# ; toplevel_path = +# Some External "/usr/home/sforman/.opam/default/lib/toplevel" +# ; ocaml_bin = External "/usr/home/sforman/.opam/default/bin" +# ; ocaml = Ok External "/usr/home/sforman/.opam/default/bin/ocaml" +# ; ocamlc = External "/usr/home/sforman/.opam/default/bin/ocamlc.opt" +# ; ocamlopt = Ok External "/usr/home/sforman/.opam/default/bin/ocamlopt.opt" +# ; ocamldep = Ok External "/usr/home/sforman/.opam/default/bin/ocamldep.opt" +# ; ocamlmklib = +# Ok External "/usr/home/sforman/.opam/default/bin/ocamlmklib.opt" +# ; env = +# map +# { "DUNE_OCAML_HARDCODED" : "/usr/home/sforman/.opam/default/lib" +# ; "DUNE_OCAML_STDLIB" : "/usr/home/sforman/.opam/default/lib/ocaml" +# ; "DUNE_SOURCEROOT" : +# "/usr/home/sforman/src/Joypy/implementations/Ocaml/helloworld" +# ; "INSIDE_DUNE" : +# "/usr/home/sforman/src/Joypy/implementations/Ocaml/helloworld/_build/default" +# ; "MANPATH" : +# "/usr/home/sforman/src/Joypy/implementations/Ocaml/helloworld/_build/install/default/bin" +# ; "OCAMLFIND_IGNORE_DUPS_IN" : +# "/usr/home/sforman/src/Joypy/implementations/Ocaml/helloworld/_build/install/default/lib" +# ; "OCAMLPATH" : +# "/usr/home/sforman/src/Joypy/implementations/Ocaml/helloworld/_build/install/default/lib" +# ; "OCAMLTOP_INCLUDE_PATH" : +# "/usr/home/sforman/src/Joypy/implementations/Ocaml/helloworld/_build/install/default/lib/toplevel" +# ; "OCAML_COLOR" : "always" +# ; "OPAMCOLOR" : "always" +# } +# ; findlib_paths = [ External "/usr/home/sforman/.opam/default/lib" ] +# ; arch_sixtyfour = true +# ; natdynlink_supported = true +# ; supports_shared_libraries = true +# ; ocaml_config = +# { version = "4.14.0" +# ; standard_library_default = "/usr/home/sforman/.opam/default/lib/ocaml" +# ; standard_library = "/usr/home/sforman/.opam/default/lib/ocaml" +# ; standard_runtime = "the_standard_runtime_variable_was_deleted" +# ; ccomp_type = "cc" +# ; c_compiler = "cc" +# ; ocamlc_cflags = +# [ "-O2"; "-fno-strict-aliasing"; "-fwrapv"; "-pthread"; "-fPIC" ] +# ; ocamlc_cppflags = [ "-D_FILE_OFFSET_BITS=64" ] +# ; ocamlopt_cflags = +# [ "-O2"; "-fno-strict-aliasing"; "-fwrapv"; "-pthread"; "-fPIC" ] +# ; ocamlopt_cppflags = [ "-D_FILE_OFFSET_BITS=64" ] +# ; bytecomp_c_compiler = +# [ "cc" +# ; "-O2" +# ; "-fno-strict-aliasing" +# ; "-fwrapv" +# ; "-pthread" +# ; "-fPIC" +# ; "-D_FILE_OFFSET_BITS=64" +# ] +# ; bytecomp_c_libraries = [ "-lm"; "-lpthread" ] +# ; native_c_compiler = +# [ "cc" +# ; "-O2" +# ; "-fno-strict-aliasing" +# ; "-fwrapv" +# ; "-pthread" +# ; "-fPIC" +# ; "-D_FILE_OFFSET_BITS=64" +# ] +# ; native_c_libraries = [ "-lm" ] +# ; native_pack_linker = [ "ld"; "-r"; "-o" ] +# ; cc_profile = [] +# ; architecture = "amd64" +# ; model = "default" +# ; int_size = 63 +# ; word_size = 64 +# ; system = "freebsd" +# ; asm = [ "cc"; "-c" ] +# ; asm_cfi_supported = true +# ; with_frame_pointers = false +# ; ext_exe = "" +# ; ext_obj = ".o" +# ; ext_asm = ".s" +# ; ext_lib = ".a" +# ; ext_dll = ".so" +# ; os_type = "Unix" +# ; default_executable_name = "a.out" +# ; systhread_supported = true +# ; host = "x86_64-unknown-freebsd12.3" +# ; target = "x86_64-unknown-freebsd12.3" +# ; profiling = false +# ; flambda = false +# ; spacetime = false +# ; safe_string = true +# ; exec_magic_number = "Caml1999X031" +# ; cmi_magic_number = "Caml1999I031" +# ; cmo_magic_number = "Caml1999O031" +# ; cma_magic_number = "Caml1999A031" +# ; cmx_magic_number = "Caml1999Y031" +# ; cmxa_magic_number = "Caml1999Z031" +# ; ast_impl_magic_number = "Caml1999M031" +# ; ast_intf_magic_number = "Caml1999N031" +# ; cmxs_magic_number = "Caml1999D031" +# ; cmt_magic_number = "Caml1999T031" +# ; natdynlink_supported = true +# ; supports_shared_libraries = true +# ; windows_unicode = false +# } +# } diff --git a/implementations/Ocaml/helloworld/bin/dune b/implementations/Ocaml/helloworld/bin/dune new file mode 100644 index 0000000..a971f63 --- /dev/null +++ b/implementations/Ocaml/helloworld/bin/dune @@ -0,0 +1,4 @@ +(executable + (public_name helloworld) + (name main) + (libraries helloworld)) diff --git a/implementations/Ocaml/helloworld/bin/main.ml b/implementations/Ocaml/helloworld/bin/main.ml new file mode 100644 index 0000000..2fcd04c --- /dev/null +++ b/implementations/Ocaml/helloworld/bin/main.ml @@ -0,0 +1,24 @@ +type joy_type = + | JoySymbol of string + | JoyTrue + | JoyFalse + | JoyInt of int + | JoyList of joy_type list + +(* type joy_list = joy_type list *) + +let joy_true = JoyTrue +let joy_false = JoyFalse +let j_loop = JoySymbol "loop" +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)) ^ "]";; + +let () = print_endline (joy_to_string dummy) diff --git a/implementations/Ocaml/helloworld/dune-project b/implementations/Ocaml/helloworld/dune-project new file mode 100644 index 0000000..7443421 --- /dev/null +++ b/implementations/Ocaml/helloworld/dune-project @@ -0,0 +1,26 @@ +(lang dune 3.4) + +(name helloworld) + +(generate_opam_files true) + +(source + (github username/reponame)) + +(authors "Author Name") + +(maintainers "Maintainer Name") + +(license LICENSE) + +(documentation https://url/to/documentation) + +(package + (name helloworld) + (synopsis "A short synopsis") + (description "A longer description") + (depends ocaml dune) + (tags + (topics "to describe" your project))) + +; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project diff --git a/implementations/Ocaml/helloworld/helloworld.opam b/implementations/Ocaml/helloworld/helloworld.opam new file mode 100644 index 0000000..e8e1f76 --- /dev/null +++ b/implementations/Ocaml/helloworld/helloworld.opam @@ -0,0 +1,31 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "A short synopsis" +description: "A longer description" +maintainer: ["Maintainer Name"] +authors: ["Author Name"] +license: "LICENSE" +tags: ["topics" "to describe" "your" "project"] +homepage: "https://github.com/username/reponame" +doc: "https://url/to/documentation" +bug-reports: "https://github.com/username/reponame/issues" +depends: [ + "ocaml" + "dune" {>= "3.4"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/username/reponame.git" diff --git a/implementations/Ocaml/helloworld/lib/dune b/implementations/Ocaml/helloworld/lib/dune new file mode 100644 index 0000000..ab364d0 --- /dev/null +++ b/implementations/Ocaml/helloworld/lib/dune @@ -0,0 +1,2 @@ +(library + (name helloworld)) diff --git a/implementations/Ocaml/helloworld/test/dune b/implementations/Ocaml/helloworld/test/dune new file mode 100644 index 0000000..5484c29 --- /dev/null +++ b/implementations/Ocaml/helloworld/test/dune @@ -0,0 +1,2 @@ +(test + (name helloworld)) diff --git a/implementations/Ocaml/helloworld/test/helloworld.ml b/implementations/Ocaml/helloworld/test/helloworld.ml new file mode 100644 index 0000000..e69de29