Module Topkg

The transitory OCaml package builder.

See the basics and the menagerie of pkg.ml files.

v1.0.1 - homepage

Preliminaries

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

r >>= f is f v if r = Ok v and r if r = Error _.

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

r >>| f is Ok (f v) if r = Ok v and r if r = Error _.

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

This definition re-export result's constructors so that an open Topkg gets them in scope.

type 'a result = ('a[ `Msg of string ]) r

The type for topkg results.

module R : sig ... end

Result value combinators.

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

strf is Printf.asprintf.

module String : sig ... end

Strings.

type fpath = string

The type for file system paths.

module Fpath : sig ... end

File system paths.

module Cmd : sig ... end

Command lines.

module Log : sig ... end

Topkg log.

module OS : sig ... end

OS interaction.

module Vcs : sig ... end

Version control system repositories.

Package description

module Conf : sig ... end

Build configuration.

module Exts : sig ... end

Exts defines sets of file extensions.

module Pkg : sig ... end

Package description.

Private

module Private : sig ... end

Private definitions.

Basics

Source repository setup

Quick setup (advertisement)

opam and package build instructions

Package description

Install description

Installing libraries and C stubs

Installing binaries

Conditional install

Automatic install conditions

Extension sets and platform dependent extensions

Renaming and installing in subdirectories

Handling cmt and cmti files

Package care

Documentation care

Advanced topics

Storing build configuration information in software

Multiple opam packages for a single distribution

Menagerie of pkg.ml files