Setup Scala

This commit is contained in:
Paul-Henri Froidmont 2023-12-04 08:02:51 +01:00
parent 8dec7591dd
commit 13a8e74189
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
37 changed files with 290 additions and 187 deletions

26
ocaml/lib/problem.ml Normal file
View file

@ -0,0 +1,26 @@
(** The type of an Advent of Code puzzle which can be run by Tanenbaum. *)
module type T = sig
val year : int
(** The year that this puzzle is from. *)
val day : int
(** The day that this puzzle is from. *)
(** Contains specific to the first part of the puzzle. *)
module Part_1 : sig
val run : string -> (string, string) result
(** Runs the first part of the puzzle.
This should return [Error] if something goes wrong during execution -- for example, there
was a parsing error. If [Error] was returned, Tanenbaum will ignore the [--submit] flag. *)
end
(** Contains specific to the second part of the puzzle. *)
module Part_2 : sig
val run : string -> (string, string) result
(** Runs the second part of the puzzle.
This should return [Error] if something goes wrong during execution -- for example, there
was a parsing error. If [Error] was returned, Tanenbaum will ignore the [--submit] flag. *)
end
end