Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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