package volgo

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Non_raising.MakeSource

Helpers to wrap process outputs.

Parameters

module M : M

Signature

Sourceval exit0 : Output.t -> (unit, M.t) Result.t
Sourceval exit0_and_stdout : Output.t -> (string, M.t) Result.t
Sourceval exit_code : Output.t -> accept:(int * 'a) list -> ('a, M.t) Result.t

A convenient wrapper to write exhaustive match on a result conditioned by a list of accepted exit codes. If the exit code is not part of the accepted list, the function takes care of returning an error of the expected result type.

OCaml

Innovation. Community. Security.