I'm happy to announce the release 3.0 of Litiom, a small library aiming to complement Eliom, the web programming framework part of the Ocsigen project. Litiom is basically a collection of modules offering high-level constructs for Web programming.

Along with some minor adjustments so that Litiom works with the newly release Eliom 4.0, Litiom 3.0 takes advantage of the bump in major version number to make a long sought reorganisation of the API. Yes, this means that Litiom 3.0 is not backwards-compatible with Litiom 2.1. On the bright side, porting code using the old Litiom to the new one is mostly a matter of search & replace, and should not require any major refactoring. Here's the changelog:

  • Split off choose related code into Litiom_choice module. As a consequence, functors and interfaces have been renamed.
  • In CHOOSABLE signature, rename elems to all for compatibility with Jane Street's Enumerate syntax extension.
  • Function choose now accepts transform optional function as parameter (defaults to String.Capitalize).
  • List of elements now of type t list (may be empty) instead of t * t list. Accordingly, parameter allowed in function choose is now also of type t list. (The function will raise Invalid_argument if provided with an empty list, however).
  • Check for value only once in function choose.
  • Select now takes required optional parameter, in track with changes in Eliom 4.0.

If you're porting code from Litiom 2.1 to 3.0 and you've never used the choose related code, then you'll just have to rename some modules/signatures/functors. For instance, signature Litiom_type.SIMPLE_BASE is now called Litiom_type.STRINGABLE, and functor Litiom_type.Make_simple is now just Litiom_type.Make. If on the other hand you used choose facilities, bear in mind that those have moved into their own Litiom_choice module. Therefore, the old functor Litiom_type.Make_choice is now Litiom_choice.Make.

The API documentation is available online, and includes some concrete examples to get you up-to-speed. Also, the package is already available in OPAM. Happy hacking!