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
Fwd: Re: [Caml-list] mutually referencing compilation units
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-19 (07:58)
From: Yann Régis-Gianas <yann@l...>
Subject: Fwd: Re: [Caml-list] mutually referencing compilation units
Le Jeudi 19 Septembre 2002 05:09, John Max Skaller a écrit :
> Xavier Leroy wrote:
> > > Is the fact that two mutually referencing units can't be compiled
> > > supposed to be a Good Thing?
> >
> > [..]
> > However, there are deep semantical and
> > type-theoretical reasons that make it hard to allow cross-module
> > recursion in ML.  This is actually a research area that is still
> > largely open.
> [...]
> The constraint only applies to open directives
> and is related to name lookup, not typing.

	Linking of values are now well formalized in calculus like m-calculus (Wells
and Vestegaard) or CMS (Ancona and Zucca). The principal idea is to define
link between components and variables apart from their definition. Units of
Flatt or Felleisen are also a good example of implementation of this idea.

	However, "deferred types" (which allows a way to obtain mutually recursive
types across modules) are not managed in these formalisms The main problem
with ML family's languages may be that they need a context to type terms and
that incomplete contexts leads to the impossibility of typing modules ... I
am not yet a specialist of the field but you can read the following articles
to understand the general problem of mutually recursive modules (aka mixins).

J. B. Wells and Rene Vestergaard.
Equational reasoning for linking with first-class primitive modules.

Tom Hirschowitz and Xavier Leroy
Mixin Modules in a Call-by-Value Setting

D. Ancona and E. Zucca
A calculus of module systems

Karl Crary and Robert Harper and Sidd Puri
What is a Recursive Module?

- --
Yann Regis-Gianas

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