-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathproblem.ml
26 lines (21 loc) · 984 Bytes
/
problem.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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