Ocaml sexp Sex chat with aunty sites

While this format is not terribly efficient in terms of disk usage, it has the advantage of being totally platform-independent: S-Expressions written with one version of OCaml may be transmitted across the network or saved and read with another version of OCaml.

The secondary advantage is that this format is human-readable and may be used, for instance, for debuggging purposes, or as an alternative to Haskell's more powerful .

Saving data to a human-readable format/reading data from a human-readable format.

This module provides a set of combinators which may be used to convert any OCaml data to a text representation as S-Expressions (a format comparable to XML or JSON and widely used in the world or programming).

is a ppx rewriter that allows the use of user-defined string conversion functions in format strings (that is, strings passed to printf, sprintf, etc.).

If an expression with a type annotation is found, then the type is used to convert to s-expression.

I don't know where to look up how to do it though -- Google is your friend I Core.

Std module type Query_handler = sig (** Configuration for a query handler.

A syntax extension is provided with Batteries Included to automatically generate further combinators from any of your type definitions.

Possible errors during automatic conversions from S-expressions to OCaml-values are reported in human-readable ways with exact location information.

The library also offers functionality for extracting and replacing sub-expressions in S-expressions.

Specifying will add a test for polymorphic equality to the generated code such that a record field containing its default value will be suppressed in the resulting S-expression.

This option requires the presence of a default value.

Leave a Reply