struct
type t = [
| `Satisfied
| `Never
| `Volume_exists of Volume.t
| `Volume_size_bigger_than of (Volume.t * int)
| `Command_returns of (Command.t * int)
| `And of t list
] [@@deriving yojson]
let rec log =
Log.(function
| `Satisfied -> s "Satisfied"
| `Never -> s "Never"
| `Volume_exists v ->
parens (s "Volume " % Volume.log v % s " exists")
| `Volume_size_bigger_than (v, sz) ->
parens (s "Volume " % Volume.log v % s " ≥ "
% i sz % nbsp % s "B")
| `Command_returns (c, ret) ->
parens (s "Command " % Command.log c % s " returns " % i ret)
| `And l ->
parens (separate (s " && ") (List.map l ~f:log))
)
let to_string_hum c = Log.to_long_string (log c)
end