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
[Caml-list] recursive modules
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-05-05 (16:59)
From: brogoff@s...
Subject: Re: [Caml-list] recursive modules
On Mon, 5 May 2003, Xavier Leroy wrote:
> The other point worth mentioning is that the detection of ill-founded
> recursive definitions (definitions that have no fixpoint in a
> call-by-value evaluation regime) is not completely static and may
> cause an "Undefined" exception to be thrown at program initialization
> time.  Fully static prevention of ill-founded recursion would, in the
> current state of our knowledge, either rule out too many valuable
> uses, or require major complications in the type system.  The proposed
> approach is a pragmatic compromise rather than a 100% intellectually
> satisfying solution.

It seems like an acceptable compromise. I've only read the note, and I surely 
won't get it until I play with the compiler. One thing that I notice is that 
the scope rule restriction on with type constraints, which adds extra verbosity 
when trying to work around the restriction on module constraints, also adds 
sone extra verbosity to your version of Okasaki's bootstrap heaps. It would 
be nicer to write 

  module rec BE : ORDERED with type t = E | H Elem.t * PrimH.heap = 
    ... etc., etc., ...

in the same way that it would be nicer to not have to textually copy signatures 
in the workaround. Could that be fixed easily? It looks like it could be fixed 
in the current (nonrecursive) module system pretty easily but I don't know about 
your proposal.

Nice work! This problem is a real pain, and your proposal provides a real 

-- Brian

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: