Version française
Home     About     Download     Resources     Contact us    
Browse thread
Explicitly referring to top-level definitions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Edgar Friendly <thelema314@g...>
Subject: Re: [Caml-list] Explicitly referring to top-level definitions
Roland Zumkeller wrote:
> Hi,
> 
> Is there a way to qualify identifiers explicitly so as to make them
> refer to top-level definitions?
> 
> # type t = int;;
> type t = int
> # module A = struct type t = t end;;
> The type abbreviation t is cyclic
> 
> Is it possible to write something like "type t = Top.t"?
> 
> Best,
> 
> Roland

In the case I've had to do this, I just created an alias for the
top-level definition. ex.

# type t = int;;
# type t_alias = t;;
# module A = struct type t = t_alias end;;

E