Version française
Home     About     Download     Resources     Contact us    
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 =
sig
  module type A
  module F :
    functor(X :
      sig
        module type A = A
        module F : functor(X : A) -> sig end
      end) -> sig end
end

module type J =
sig
  module type A = I
  module F : functor(X : I) -> sig end
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?

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners