first
This commit is contained in:
commit
29d8387656
6 changed files with 21 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
_build
|
||||||
|
.merlin
|
6
aoc2020.ml
Normal file
6
aoc2020.ml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
let days = [|Day1.main|]
|
||||||
|
|
||||||
|
let _ =
|
||||||
|
match Array.to_list Sys.argv with
|
||||||
|
| _exename :: day :: args -> days.(int_of_string day - 1) args
|
||||||
|
| _ -> Usage.exit "[day_num] args..."
|
6
day1.ml
Normal file
6
day1.ml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
let main2 _input =
|
||||||
|
print_endline "boop"
|
||||||
|
|
||||||
|
let main = function
|
||||||
|
| [input] -> main2 input
|
||||||
|
| _ -> failwith "usage: $0 1 infile"
|
2
dune
Normal file
2
dune
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
(executable
|
||||||
|
(name aoc2020))
|
1
dune-project
Normal file
1
dune-project
Normal file
|
@ -0,0 +1 @@
|
||||||
|
(lang dune 2.7)
|
4
usage.ml
Normal file
4
usage.ml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
let exit args =
|
||||||
|
let err = Format.sprintf "usage: %s %s" Sys.argv.(0) args in
|
||||||
|
print_endline err;
|
||||||
|
exit 1
|
Loading…
Reference in a new issue