Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
"opening" record types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-21 (13:47)
From: Virgile Prevosto <virgile.prevosto@m...>
Subject: Re: [Caml-list] "opening" record types

Le mar 21 aoû 2007 09:18:02 CEST,
Yitzhak Mandelbaum <> a écrit :

> Is there any way around this?  That is, is there any way to use the  
> field names of a record defined in another module without opening
> the whole module or copying the whole definition of the record.

Olivier Andrieu has written a camlp4 extension (which won't compile
with camlp4 3.10, I'm afraid) that does more or less this:

It should allow you to write (not tested)

let x = Foo.{a=3; b=4}

E tutto per oggi, a la prossima volta.