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
Re: [Caml-list] Polymorphic Variants and Number Parameterized Typ es
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] Polymorphic Variants and Number Parameterized Typ es
On Mon, 29 Apr 2002, Krishnaswami, Neel wrote:
> There's no recursion in the module system because that would break
> the termination guarantee.

We currently don't have this guarantee anyway:

module type I =
  module type A
  module F :
    functor(X :
        module type A = A
        module F : functor(X : A) -> sig end
      end) -> sig end

module type J =
  module type A = I
  module F : functor(X : I) -> sig end

(* Try to check J <= I *)
module Loop(X : J) = (X : I)

> If you think of modules as records, and functors as lambda abstractions,
> you can see that the module system defines a simply-typed lambda
> calculus. As you've noticed with C++, adding recursion to it would
> mean you can write nonterminating module expressions. (All this is
> wonderfully clearly explained in the paper, "A modular module system".)

I'd really like to see Claudio Russo's generalizations of the ML-module
system in OCaml. Especially first class modules would come really handy
to me in some situations. Any news on this front?

Markus Mottl

Markus Mottl                                   
Austrian Research Institute
for Artificial Intelligence        
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: