[MLton-user] OP longvid not accepted
fluet at tti-c.org
Tue Jan 22 08:08:53 PST 2008
On Mon, 21 Jan 2008, Vesa Karvonen wrote:
> On Jan 21, 2008 6:01 PM, Florian Weimer <fweimer at bfk.de> wrote:
>> I suppose the following program is valid according to the definition
>> (MLkit accepts it):
>> val foo = op String.<
PolyML and HaMLet also accept it. SML/NJ does not. (MLton's SML .grm is
a heavily modified version of SML/NJ's.)
> Yes, this would seem to be valid according to the grammar on page 10,
> which includes
> atexp ::= <op> longvid
Yup, definitely allowed by the grammar. Since a longvid can't be used
infix, it isn't surprising that this generality in the grammar production
is seldom used.
>> However, MLton requires that "op" is always followed by a plain VId,
>> not a longVId.
> That would seem to be the case. Also, the same would seem to apply to patterns.
Yes. MLton properly handles "<op> longvid" in the exbind production.
More information about the MLton-user