Cinaps is a trivial Metaprogramming tool using the OCaml toplevel. It is based on the same idea as expectation tests. The user writes some OCaml code inside special comments and cinaps makes sure that what follows is what is printed by the OCaml code.
Earley is a parser combinator library base on Earley's algorithm. It is intended to be used in conjunction with an OCaml syntax extension which allows the definition of parsers inside the language. There is also support for writing OCaml syntax extensions in a camlp4 style.
Biniou (pronounced "be new" is a binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve. Biniou is vastly equivalent to JSON in terms of functionality but allows implementations several times faster (4 times faster than yojson), with 25-35% space savings.
This OCaml library offers a set of combinators for building so-called documents as well as an efficient engine for converting documents to a textual, fixed-width format. The engine takes care of indentation and line breaks, while respecting the constraints imposed by the structure of the document and by the text width.
FrontC is an OCAML library providing a C parser and lexer. The result is a syntactic tree easy to process with usual OCAML tree management. It provides support for ANSI C syntax, old-C K&R style syntax and the standard GNU CC attributes. It provides also a C pretty printer as an example of use.
Yojson is an optimized parsing and printing library for the JSON format. It addresses a few shortcomings of json-wheel including 2x speedup, polymorphic variants and optional syntax for tuples and variants. ydump
is a pretty printing command-line program provided with the yojson package. The program atdgen
can be used to derive OCaml-JSON serializers and deserializers from type definitions.
Library to perform parallel fold or map taking advantage of multiple core architectures for OCaml programs. Drop-in replacement for these List
operations are provided:
List.map
->parmap
List.map
->parfold
List.mapfold
->parmapfold
Also it allows specifying the number of cores to use with the optional parameter ncores
.
Ctypes is a library for binding to C libraries using pure OCaml. The primary aim is to make writing C extensions as straightforward as possible. The core of ctypes is a set of combinators for describing the structure of C types -- numeric types, arrays, pointers, structs, unions and functions. You can use these combinators to describe the types of the functions that you want to call, then bind directly to those functions -- all without writing or generating any C!
A comprehensive toolbox for ppx development. It features:
an OCaml AST / parser / pretty-printer snapshot, to create a full frontend independent of the version of OCaml;
a library for library for ppx rewriters in general, and type-driven code generators in particular;
a feature-full driver for OCaml AST transformers;
a quotation mechanism allowing to write values representing the OCaml AST in the OCaml syntax;
a generator of open recursion classes from type definitions.
Markup.ml provides an HTML parser and an XML parser. The parsers are wrapped in a simple interface: they are functions that transform byte streams to parsing signal streams. Streams can be manipulated in various ways, such as processing by fold, filter, and map, assembly into DOM tree structures, or serialization back to HTML or XML.
Both parsers are based on their respective standards. The HTML parser, in particular, is based on the state machines defined in HTML5.
The parsers are error-recovering by default, and accept fragments. This makes it very easy to get a best-effort parse of some input. The parsers can, however, be easily configured to be strict, and to accept only full documents.
Apart from this, the parsers are streaming (do not build up a document in memory), non-blocking (can be used with threading libraries), lazy (do not consume input unless the signal stream is being read), and process the input in a single pass. They automatically detect the character encoding of the input stream, and convert everything to UTF-8.
Typerep is a library for runtime types.
This package provides a deprecated logging component for ocaml lwt.
This package provides ppx_sexp_message-like extension nodes for lazily rendering log messages.
A ppx rewriter for monadic and applicative let bindings, match expressions, and if expressions.
Piqilib is the common library used by the piqi command-line tool and piqi-ocaml.
GSL-OCaml is an interface to the GNU scientific library (GSL) for the OCaml language.
This package allows parsing of dates that follow the ISO 8601 and RFC 3339 formats in OCaml.
This package is part of Jane Street's Core library. Sexplib contains functionality for parsing and pretty-printing s-expressions.
This library provides facilities to parse version numbers of the OCaml compiler, and enumerates the various official OCaml releases and configuration variants.
IO pages are page-aligned, and wrapped in the Cstruct
library to avoid copying the data contained within the page.
Crowbar is a library for testing code, combining QuickCheck-style property-based testing and the magical bug-finding powers of afl-fuzz.
This library implements a rather complete and efficient monadic parser combinator library similar to the Parsec library for Haskell by Daan Leijen and the FParsec library for FSharp by Stephan Tolksdorf.
Features:
MAC-48 (Ethernet) address support
Macaddr
is aMap.OrderedType
All types have sexplib serializers/deserializers optionally via the
Macaddr_sexp
library
Handle computation results and errors in an explicit and declarative manner, without resorting to exceptions. It defines combinators to operate on the result type available from OCaml 4.03 in the standard library.