[MLton-devel] Re: MLton question
John Reppy
jhr@cs.uchicago.edu
Fri, 3 Oct 2003 14:21:15 -0500
On Friday, October 3, 2003, at 01:27 PM, Stephen Weeks wrote:
>
>> Is it possible to build the compiler using SML/NJ?
>
> Yes. That is how we do our type checking and testing when we need
> fast compiles. There is an nj-mlton Makefile target. You can also do
> a CM.make within the mlton/ directory of the sources.
>
> BTW, we are running with SML/NJ 110.43, and due to basis library
> changes the code only works with that version.
So far, I have not been able to get MLton to compile using SML/NJ.
When I try
make LEX=ml-lex nj-mlton
I get
...
make[1]: mlton: Command not found
make[1]: mlton: Command not found
rm -f front-end/ml.lex.sml
mllex front-end/ml.lex
make[1]: mllex: Command not found
make[1]: *** [front-end/ml.lex.sml] Error 127
make: *** [nj-mlton] Error 2
and when I tried CM.make "mlton.cm" I get a a bunch of
cyclic dependency errors. For example
mlton.cm:69.1-69.29 Error: cyclic ML dependencies
(mlton.cm):../lib/mlton/basic/trace.sml refers to structure
IntermediateComputation defined in
(mlton.cm):../lib/mlton/basic/intermediate-computation.sml
(mlton.cm):../lib/mlton/basic/intermediate-computation.sml refers
to structure Time defined in (mlton.cm):../lib/mlton/basic/time.sml
(mlton.cm):../lib/mlton/basic/time.sml refers to structure
LargeInt defined in (mlton.cm):../lib/mlton/basic/int-inf.sml
(mlton.cm):../lib/mlton/basic/int-inf.sml refers to functor
Integer defined in (mlton.cm):../lib/mlton/basic/integer.fun
(mlton.cm):../lib/mlton/basic/integer.fun refers to functor
RingWithIdentity defined in
(mlton.cm):../lib/mlton/basic/ring-with-identity.fun
(mlton.cm):../lib/mlton/basic/ring-with-identity.fun refers to
structure Trace defined in (mlton.cm):../lib/mlton/basic/trace.sml
>
>> Also, I was wondering how hard it would be to retarget the C code
>> generator to MacOS X.
>
> I think it would be easy. The C is very vanilla. I don't know enough
> about the MacOS X libraries to guess how easy it is to port MLton's
> runtime system and basis library support routines.
MacOS X is pretty much a Unix OS (BSD flavor). There are some
differences in things
like dynamic loading, but they are easy to work around.
>
>> Is there any documentation on how the C backend works?
>
> No. But we're happy to answer questions. And if it would help get
> you started, I'd be willing to write a paragraph or two overview.
The notes about the sparc implementation mention that binutils is
required.
Why is that?
- John
-------------------------------------------------------
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