opam-core

Core library for opam 2.1
IN THIS PACKAGE
Module OpamProcess . Job . Op
type 'a job =
| Done of 'a
| Run of command * result -> 'a job
val (@@>) : command -> ( 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)