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
Bug in the module system of version 3.12.0+beta1
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-07-22 (02:29)
From: Alain Frisch <alain@f...>
Subject: Re: [Caml-list] Bug in the module system of version 3.12.0+beta1
On 7/21/2010 8:41 PM, Dumitru Potop-Butucaru wrote:
> If I understand well, what I try to do is impossible for
> some deep theoretical reason. Can someone explain this
> to me, or point me to a relevant paper explaining it?

Turning a module type into a module is not possible in general: if the 
module type defines runtime components like values, what module would 
you produce?

Then there is a sub-category of module types that can be turned into 
module in a natural way (module type with only type, class types, module 
types, exceptions, and recursive or non-recursive modules with the same 
constraints on their components). By pure coincidence, I played a few 
months ago with the idea of adding a construction to the language that 
would turn such a module type into a module expression (I had no 
concrete motivation to do that). This is available in the 
module_of_module_type branch of the OCaml svn repository.