Original-Via: uk.ac.st-and.cs; Fri, 18 Oct 91 09:25:44 BST


 >    All the messages pro and anti recursive modules are very interesting but
 >    my original question has been lost sight of. Are we meant to do
 >    dependency analysis across module boundaries or not? and if so can anyone
 >    see how to?
 > 
 >    Tony Davie
 > 
 > This is a very good question.  Although it is probably feasible to do
 > the dependency analysis transformation across module boundaries, my
 > feeling is that this is probably too much to ask of an implementation.
 > Thus the Report should be clarified to say that the transformation is
 > NOT done across module boundaries.  (Note also that this cannot be an
 > "option" for an implementation, since it affects the static semantics.)
 > 
 > -Paul
 > 
 > 

I think I agree with this. If analysis across boundaries is required, then
recompilation of all modules depending on a newly defined module (as
distinct from its interface) may be required as new dependencies may arise.
And this operation has to be closed. There may be further modules depending
on the newly compiled ones.

On the other hand, if analysis across boundaries is not to be done, then
variables which depend on items in another modules must be compiled
pessimistically. There is no chance of raising them from being letrec- to
being let- defined (see Simon's book section 6.2.8 pp118 et seq.) because
this might make functions more polymorphic than they really are. This
could ultimately cause a run time type error.

Tony

Reply via email to