[MLton] compile mlton using SML/NJ

John Reppy jhr at cs.uchicago.edu
Sun Oct 8 16:14:06 PDT 2006


That helped a bit.  My next problem was that mllex and mlyacc are
expected to compile the front end.  I tried changing them to ml-lex
and ml-yacc, but the generated lexer code doesn't type check.
I suspect that this problem is because the code expects an Int
structure that does not conform to the SML'97 Basis specification
(i.e., one with an Int.t type).  The error messages are of the
form

	front-end/ml.lex.sml:5429.43-5429.87 Error: operator and operand  
don't agree [tycon mismatch]
   operator domain: (SourcePos.t * SourcePos.t
                     -> (?.svalue,SourcePos.t) ?.token) * Source.t *  
Int.t
                    * Int.t
   operand:         (SourcePos.t * SourcePos.t
                     -> (?.svalue,SourcePos.t) ?.token) * Source.t *  
int * int
   in expression:
     tok (Tokens.COMMA,source,yypos,yypos + 1)

	- John




More information about the MLton mailing list