This is an example of non-idempotent formatting, which seems to be due to how comments are handled. We should fix this.
Original:
|
if offset i + j + 1 < offset (i+1) then |
|
(* innerIdx := j+1 *) () |
|
else |
|
( outerIdx := advanceUntilNonEmpty (i+1) |
|
(* ; innerIdx := 0 *) |
|
); |
Here's the diff between running the formatter once and twice. This seems to happen because the comment crosses the max width.
if offset i + j + 1 < offset (i + 1) then
()
else
- (outerIdx := advanceUntilNonEmpty (i + 1)(* ; innerIdx := 0 *) );
+ (outerIdx
+ := advanceUntilNonEmpty (i + 1) (* ; innerIdx := 0 *));
Note that smlfmt catches this when run with --check:
$ ./smlfmt --check src/lib/github.com/mpllang/mpllib/OldDelayedSeq.sml
WARNING: src/lib/github.com/mpllang/mpllib/OldDelayedSeq.sml: non-idempotent formatting detected.
Don't worry! The output is still correct; this is only an aesthetic issue. To help improve `smlfmt`,
please consider submitting a bug report: https://github.com/shwestrick/smlfmt/issues
overwrite src/lib/github.com/mpllang/mpllib/OldDelayedSeq.sml [y/N]?
This is an example of non-idempotent formatting, which seems to be due to how comments are handled. We should fix this.
Original:
smlfmt/src/lib/github.com/mpllang/mpllib/OldDelayedSeq.sml
Lines 213 to 218 in 8090550
Here's the diff between running the formatter once and twice. This seems to happen because the comment crosses the max width.
if offset i + j + 1 < offset (i + 1) then () else - (outerIdx := advanceUntilNonEmpty (i + 1)(* ; innerIdx := 0 *) ); + (outerIdx + := advanceUntilNonEmpty (i + 1) (* ; innerIdx := 0 *));Note that
smlfmtcatches this when run with--check: