[MLton] MLton and Moby

Stephen Weeks MLton@mlton.org
Sat, 7 Feb 2004 15:52:26 -0800


> > This shouldn't be too hard.  The problem is how to display the sharing
> > in interfaces, which really requires the introduction of new signature
> > names.  And that problem may only be bad for MLton-style deep
> > structure code, so it could be ignored at first.
> 
> I don't quite follow this.  What is the issue?

Consider the following code

signature S = sig ... <lots of specs> ... end
signature T =
   sig
      structure S1: S
      structure S2: S
   end

Right now, the implementation of interfaces doesn't keep track of the
connection between the original declaration of S and the interfaces
for S1 and S2.  So, the display routine would either repeat the entire
interface for each of S1 and S2, or would have to choose a new
signature name.  This becomes trickier if where constraints or sharing
have modified a signature.  But avoiding fully deep display of
interfaces is probably essential for MLton-style code.