David,
This looked like a really useful feature so I thought I'd try it out.
Unfortunately, I have code that fails as in the cut-down example below:
Poly/ML 5.3 Enhanced Reporting Testing
> val rec f = (fn x => ());
Error-Recursive declaration is not of the form `fn match'
Found near val rec f = (fn x => ())
Static Errors
If this is intended, I presume the enhanced reporting includes a check
that disallows the brackets around the right-hand side of the
declaration. I note that hamlet also says that this is an error, so
there is support for reading the standard that way. I suspect I will
not be alone in having a fair amount of code that doesn't conform.
This looks like another place where Standard ML imposes unintuitive
constraints that make it hard to write readable, maintainable code.
The reason for using "val rec" rather than "fun" in the real code is
that I want to give a type constraint on the function (which for no
obvious reason is not allowed in a "fun" binding); the reason for the
brackets is that the declaration is long and I want to be able to use
bracket matching to find the end.
Regards,
Rob.
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml