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: | -- (:) |
| From: | Olivier Andrieu <oandrieu@g...> |
| Subject: | Re: [Caml-list] "opening" record types |
On 8/21/07, Yitzhak Mandelbaum <yitzhak@research.att.com> wrote:
> module Foo =
> struct
> type t = {a: int; b:int}
> end
>
> without copying the type:
>
> let y = {Foo.a=3; Foo.b=4}
actually, you can write
let y = {Foo.a=3; b=4}
i.e. you only need the module name on one field of the record, not all
--
Olivier