From: Andreas R. <ros...@ps...> - 2001-10-05 09:57:59
|
Stephen Weeks wrote: > > Three of your test cases tickled another obscure part of the > Definition (to me anyway), and I suspect it was unintentional on your > part. The tests "asterisk", "semicolon", and "typespec" contained the > '\r' character (ascii decimal 13). Quoting from the Definition: > > Section 2.5: > Comments and formatting characters separate items (except with > string constants; see Section 2.2) and are otherwise ignored. > Section 2.2: > The formatting characters are a subset of the non-printable > characters including at least space, tab, newline, formfeed. True, I think it is an oversight that \r is not included, since it is obligatory at least on Dos/Windows-based systems and sources should be portable across the "major" OS'es. And it would make sense to include at least those formatting characters for which there is explicit escape syntax. > At present, MLton rejects them. Oops, I didn't notice that this was the problem. After removing the offending characters, MLton indeed accepts the "semicolon" and "typespec" examples. The same seems to be true for the MLKit, which accepts all three examples now. > BTW, as an implementor, I really appreciate having examples like this > to clarify things. Yes, in fact the main reason I made them was for me as an implementor to get all of this working in HaMLet. I finally managed it for all but two of the examples (abstype and fun-case) but it was not always fun. Note btw. that the reason why "abstype" is actually working in Alice is only due to the fact that the compiler does not distinguish equality types. I guess the same is true for MLton? - Andreas |