| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Col

This version was saved 17 years, 11 months ago View current version     Page history
Saved by PBworks
on April 26, 2006 at 11:27:41 pm
 

Intro

 

Col is a syntax library for OCaml for a compact and safe definition of IO functions on lists of flat records.

 

One type definition in a record-like syntax is expanded into a regular type definition of a record type, a tuple type and a class, plus many conversion functions which would have to be written manually otherwise. List of such objects can be loaded from and saved to CSV files with a header describing each field (column). You can edit these files manually, possibly by inserting new columns, and yet these files remain readable by your program.

 

See http://martin.jambon.free.fr/col-doc.html for an illustration of a program and the result after preprocessing. Hopefully it is self-explanatory. You can notice that the interface (doc.mli) which is automatically generated is much longer than the source implementation (doc.ml ~80 lines). After preprocessing, the implementation (doc.ppo) is truly huge (~800 lines), so it might take a while to compile.

 

Examples

 

(examples examples ...)

 

Bugs

 

Installation

 

There is a bug in 3.09.1 which prevents from pr_o.cmo from working correctly (Stack overflow while executing something like "camlp4o pr_o.cmo ..."). The bug is not present in 3.08.4 and has been fixed in 3.09.2. If you are having this problem, compile with:

make common bc nc

(instead of "make" alone)

Comments (0)

You don't have permission to comment on this page.