Version française
Home     About     Download     Resources     Contact us    
Browse thread
Renaming structures during inclusions?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Aleksey Nogin <nogin@c...>
Subject: Re: [Caml-list] Renaming structures during inclusions?
On 11.05.2005 08:44, Markus Mottl wrote:

> The only solution that seems to make sense and does not impose
> excessive work on the user is, IMHO, to provide for a facility to
> rename types and modules, e.g. maybe something like:
> 
> ----------------------------------------------
> module M = struct
>   include M1
>     with type t as m1_t
>     with module Std as M1Std
> 
>   include M2
>     with type t as m2_t
>     with module Std as M2Std
> 
>   module Std = struct
>     include M1Std
>     include M2Std
>   end
> end
> ----------------------------------------------

I would like to second this request. Currently, including several 
modules that share some structure is impossible and requires giving 
separate names for all the shared fields, with can be very painful. The 
"with" renaming seems simple enough and AFAICT would not break anything.

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200