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: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] "opening" record types
Hi,

> 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.

Yes, instead of doing "open Foo", do:

  type t = Foo.t = {a: int; b:int}

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/