bos

Basic OS interaction for OCaml
Library bos_setup
Module Bos_setup

Interpreted programs

To use Bos and this setup in an interpreted program, start the file with:

#!/usr/bin/env ocaml
#use "topfind"
#require "bos.setup"
open Bos_setup

To allow merlin to function correctly issue M-x merlin-use bos.setup in emacs or :MerlinUse bos.setup in vim.

Results

type ('a, 'b) result = ( 'a, 'b ) result =
| Ok of 'a
| Error of 'b

The type for results.

val (>>=) : ( 'a, 'b ) result -> ( 'a -> ( 'c, 'b ) result ) -> ( 'c, 'b ) result

(>>=) is R.(>>=).

val (>>|) : ( 'a, 'b ) result -> ( 'a -> 'c ) -> ( 'c, 'b ) result

(>>|) is R.(>>|).

module R : sig ... end

Astring

val strf : ( 'a, Format.formatter, unit, string ) format4 -> 'a

strf is Astring.strf.

val (^) : string -> string -> string
module Char : sig ... end
module String : sig ... end

Bos

module Pat : sig ... end
module Cmd : sig ... end
module OS : sig ... end

Fmt & Logs

Note. The following aliases are strictly speaking not needed but they allow to end-users to use them by expressing a single dependency towards bos.setup.

module Fmt : sig ... end
module Logs : sig ... end