Browse thread
"opening" record types
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 |
Hello, Le mar 21 aoû 2007 09:18:02 CEST, Yitzhak Mandelbaum <yitzhak@research.att.com> 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: http://oandrieu.nerim.net/ocaml/index.html#pa_records It should allow you to write (not tested) let x = Foo.{a=3; b=4} -- E tutto per oggi, a la prossima volta. Virgile