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

> 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