smlfmt
smlfmt copied to clipboard
SuccessorML syntax
Hi there - Thanks for the nice tool.
I'm wondering what your stance is on smlfmt
being able to format code that uses the SuccessorML syntax additions:
http://mlton.org/SuccessorML
Personally I like allowOptBar
, allowOrPats
, and allowRecordPunExps
of those, and having to choose between being able to use them, and being able to autoformat code, is a tough choice!
Great suggestion. I'm definitely interested in adding these!
@frou These should now be working:
-allow-opt-bar true -allow-record-pun-exps true -allow-or-pats true
If you have a chance to try them out on your code, that would be really helpful. Please let me know if you encounter any problems!
I'll leave the issue open for now, because I'd like to add support for other SuccessorML features, too.
Sam - thank you very much. They are working, including the hints to enable them if the flags aren't given. Great stuff!
Excellent! Glad to hear.
These features can now also be controlled from within an MLB; see #73.
Nice. If that part gets completely built out, then I think one notable scenario to test is when the MLB author deliberately "overshoots" by enabling everything, and then backs off the one or two that they don't like, e.g.
ann
"allowSuccessorML true"
"allowOptSemicolon false"
in
foo.sml
end
Cool! This makes me think that there are a lot of interesting code linting features that smlfmt
could eventually offer.