package containers

  1. Overview
  2. Docs
A modular, clean and powerful extension of the OCaml standard library

Install

Dune Dependency

Authors

Maintainers

Sources

v3.5.tar.gz
md5=efc44e54af764ddb969ec823b7539a3e
sha512=df7c147233f13490710e81279a365290c85d4a00280d56a5bd2a74c579568abbe08c04a60c80f2936d7c15194b58b54b112b974eb8a0d28e131bae5ef38ac10d

doc/containers/CCParse/Infix/index.html

Module CCParse.InfixSource

Sourceval (>|=) : 'a t -> ('a -> 'b) -> 'b t

Map.

Sourceval (>>=) : 'a t -> ('a -> 'b t) -> 'b t

Monadic bind. p >>= f results in a new parser which behaves as p then, in case of success, applies f to the result.

Sourceval (<*>) : ('a -> 'b) t -> 'a t -> 'b t

Applicative.

Sourceval (<*) : 'a t -> _ t -> 'a t

a <* b parses a into x, parses b and ignores its result, and returns x.

Sourceval (*>) : _ t -> 'a t -> 'a t

a *> b parses a, then parses b into x, and returns x. The results of a is ignored.

Sourceval (<|>) : 'a t -> 'a t -> 'a t

a <|> b tries to parse a, and if a fails without consuming any input, backtracks and tries to parse b, otherwise it fails as a. See try_ to ensure a does not consume anything (but it is best to avoid wrapping large parsers with try_).

Sourceval (<?>) : 'a t -> string -> 'a t

a <?> msg behaves like a, but if a fails without consuming any input, it fails with msg instead. Useful as the last choice in a series of <|>: a <|> b <|> c <?> "expected a|b|c".

OCaml

Innovation. Community. Security.