type 'control action = 'control Httnope_spec.Program.action = | Send of Spec_transport.t | Wait_ms of int | Control of 'control type 'control t = 'control action Httnope_spec.Nonempty.t let of_list_exn ~what actions = match Httnope_spec.Program.of_list actions with | Ok program -> program | Error message -> invalid_arg (what ^ ": " ^ message) let to_list = Httnope_spec.Program.to_list let compile ~send ~wait_ms ~control program = match Httnope_spec.Program.compile ~send:(fun transport -> Ok (send transport)) ~wait_ms ~control program with | Ok actions -> actions | Error message -> invalid_arg message