blob: 83f7d5c89480bcecbce9057e6de838c582e1d163 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(** Just a proof of concept.
Display the hash of the configuration *)
let name = __FILE__
let description = "Print the hash of the configuration"
let speclist = []
type t = (int, Configuration.Read_conf.error) result
let pp : Format.formatter -> t -> unit =
Format.pp_print_result ~error:Configuration.Read_conf.pp_error
~ok:Format.pp_print_int
let exec : string list -> t =
fun _ ->
let stdin = In_channel.input_all stdin in
let ( let+ ) opt cont = Result.map cont opt in
let+ configuration = Configuration.Read_conf.read_string_conf stdin in
Hashtbl.hash configuration
|