English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ANN] Tywith - Generating functions from type definitions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-25 (14:03)
From: Martin Sandin <om_sandin@y...>
Subject: [ANN] Tywith - Generating functions from type definitions
Tywith Module version 0.3 - initial release

Tywith is an OCaml camlp4 parser extension which
derives functions from type definitions. It's
currently capable of generating 'string_of_<type>',
'map_<type>', and 'fold_<type>' functions for alias
and variant types containing tuples and other types
with the appropriate functions defined. Tywith
special-cases built-in types such as list, int, and
string to provide or use the appropriate functions.

This package extends OCaml with the following
syntactic construction

   type <def> with <id> [,<id>..])

The id's currently supported are 'string_of', 'map',
and 'fold', which will result in the generation of the
appropriate functions. The fold functions will
typically depend on the presence of a map function for
any type mentioned inside the definition which depend
on a type parameter.

Download Tywith from
or directly from

Martin Sandin

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around