From e1402bc17d856a1cc33058a5f2832828b8ee3142 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 21 Sep 2023 20:05:48 -0700 Subject: [PATCH] made src a lib so that it loads into utop also made an exe dir that does what `main.ml` used to do. now `dune exec aoc` and `dune utop .` both do what they should :) --- exe/dune | 4 ++++ exe/main.ml | 6 ++++++ src/dune | 5 ++--- src/main.ml | 4 ---- 4 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 exe/dune create mode 100644 exe/main.ml delete mode 100644 src/main.ml diff --git a/exe/dune b/exe/dune new file mode 100644 index 0000000..5f933ef --- /dev/null +++ b/exe/dune @@ -0,0 +1,4 @@ +(executable + (public_name aoc) + (name main) + (libraries aoc)) diff --git a/exe/main.ml b/exe/main.ml new file mode 100644 index 0000000..5c44db9 --- /dev/null +++ b/exe/main.ml @@ -0,0 +1,6 @@ +open Aoc + +let () = + Day1.print (); + Day2.print () +;; diff --git a/src/dune b/src/dune index 0682cc8..17ab1e5 100644 --- a/src/dune +++ b/src/dune @@ -1,5 +1,4 @@ -(executable - (public_name aoc) - (name main) +(library + (name aoc) (libraries stdio re) (preprocess (pps ppx_regexp))) diff --git a/src/main.ml b/src/main.ml deleted file mode 100644 index 754d190..0000000 --- a/src/main.ml +++ /dev/null @@ -1,4 +0,0 @@ -let () = - Day1.print; - Day2.print -;;