module Op: sig
.. end
Open type and add combinators. Meant to be opened
type 'a
job =
val (@@>) : OpamProcess.command ->
(OpamProcess.result -> 'a job) ->
'a job
Stage a shell command with its continuation, eg:
command "ls" ["-a"] @@> fun result ->
if OpamProcess.is_success result then Done result.r_stdout
else failwith "ls"
val (@@+) : 'a job ->
('a -> 'b job) -> 'b job
job1 @@+ fun r -> job2
appends the computation of tasks in job2
after
job1
val (@@|) : 'a job -> ('a -> 'b) -> 'b job
job @@| f
maps f
on the results of job
.
Equivalent to job @@+ fun r -> Done (f r)