Browse thread
Type equalities in sub modules
- Daniel_Bünzli
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-12-31 (09:33) |
From: | Daniel_Bünzli <daniel.buenzli@e...> |
Subject: | Type equalities in sub modules |
Hello, In the example below, is there any way to achieve M.B.t = M.t without introducing the intermediate mt type ? > module M = struct > type t = int > module B = struct > type mt = t > type t = mt > end > end This doesn't work : > module M = struct > type t = int > module B = struct > type t = M.t > end > end This doesn't work : > module M = struct > type t = int > module B = struct > type t = t > end > end It seems type definitions should have been designed like value definitions by having both a 'type' and 'type rec' construct (though one can argue this is sufficently rare to justify the above inconvenience). Thanks for your answers, Daniel