[MLton-devel] integrating multiple basis libs

Matthew Fluet fluet@CS.Cornell.EDU
Thu, 21 Nov 2002 13:59:22 -0500 (EST)


I'm looking for suggestions on how to make MLton support multiple basis
libaries.  The biggest problems seem to be the constants file and managing
the environments.

>From the declarative point of view, I was thinking something like the
following:

basis-library/libs/basis-2002/build-basis
                              bind-basis
                              suffix-basis
                   basis-1997/build-basis
                              bind-basis
                              suffix-basis
                   none/build-basis
                        bind-basis
                        suffix-basis

The advantage of the above is that each basis library is completely
independent of the others.  That's also a disadvantage: each basis library
will be parsed and elaborated in isolation (so the world.mlton file will
be twice as large).  Also, we would seem to need separate constants files
for each basis library.

An alternative is the following:

basis-library/libs/build-basis
                   basis-2002/bind-basis
                              suffix-basis
                   basis-1997/bind-basis
                              suffix-basis
                   none/bind-basis
                        suffix-basis

This way, all basis libraries share the build-basis, but each one
specifies what to export.  The advantage here would seem to be sharing the
build-basis environment.  Likewise, there should be one set of constants
pulled out of the shared build-basis.  From the code, though, it looks
like the Elaborate.Env.t structures are mutable, so I'm not sure that I
can get the right behaviour from one basisEnv shared between all
libraries.

Other alternatives?




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel