add containers and remove jane streets stdio

This commit is contained in:
ryan 2023-09-22 15:09:12 -07:00
parent d8a90a3ae5
commit 661cdf1c95
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
(library
(name aoc)
(libraries stdio re dune-site)
(libraries re containers dune-site)
(preprocess (pps ppx_regexp)))
(install

View File

@ -1,3 +1,5 @@
open Containers
let lines_of_input day =
let base_path =
match Inputs.Sites.inputs with
@ -5,5 +7,5 @@ let lines_of_input day =
| _ -> failwith "cant find path containing inputs"
in
let path = Printf.sprintf "%s/day%d.tt" base_path day in
Stdio.In_channel.(with_file path ~f:input_lines)
IO.(with_in path read_lines_l)
;;