OCaml at LexiFi

Alain Frisch, 2014/04/10

I'd like to introduce a new language feature, inlined record arguments on constructors, which I propose for inclusion in OCaml. In a nutshell, it allows you to define a record directly within a sum type constructor:

1
2
3
  type t =
     | A of { x : int; y: string }
     | ...

The argument of the constructor is a full-fledged record type. All features of records are available: dot notation, mutable fields, polymorphic fields, punning syntax, record override. You can write:

Alain Frisch, 2012/06/29

In a previous post, I've described a proposal on how to get rid of Camlp4 to write simple syntax extensions. This proposal slowly becomes a reality:

Alain Frisch, 2013/01/11

In this post, I propose Static Exceptions as a new language feature allowing programmers to express interesting control flows in a compact way.

Alain Frisch, 2012/11/28

The goal is to display the following to stdout:

(0,0)
(1,1)
(2,2)
...
(1000000,1000000)

How would you implement that in OCaml? For such a simple task, we probably expect the program to be IO bound, right? Ok, let's try with the idiomatic way, which is to use format strings as provided by the Printf module from OCaml standard library:

Alain Frisch, 2012/11/27

Most languages provide some way to manipulate tuples of values with a proper label for each field. They are called structures in C, records in OCaml; objects as found in most mainstream OO languages extend this same notion.

Alain Frisch, 2012/07/23
Registration is now open for ICFP and affiliated events, including the ML workshop 2012. Researchers, developers and users of OCaml and other languages of the ML family (SML, F#) are invited to participate to the workshop, on September 13. This is between the main ICFP conference and the OCaml Users and Developers Workshop, also of interest for the OCaml community.
Alain Frisch, 2012/03/15

I'm pleased to announce that the next instance of the ML workshop will take place on September 13th in Copenhagen.

ML2012 will be an informal workshop targeting both researchers, implementors, and users of ML languages (like Standard ML, OCaml, and F#).

Alain Frisch, 2011/12/08

It is often useful to get access to types at runtime, in order to implement generic type-driven operations. A typical example is a generic value pretty-printer. Unfortunately, the OCaml compiler does not keep type information at runtime. At LexiFi, we have extended OCaml to support runtime types.

Alain Frisch, 2011/04/20

In this post, I'd like to propose a new approach to extending the syntax of OCaml that does not depend on Camlp4. This proposal is the result of discussions with Xavier Clerc, Fabrice Le Fessant, Maxence Guesdon, and has been presented to the latest meeting of the Caml Consortium. It was also quickly mentioned by Xavier Leroy during his talk at the latest OCaml Users Meeting.

Alain Frisch, 2011/04/08

A little teaser for OCaml gurus: what does the function below do?

Syndicate content