Sam Westrick

Results 52 comments of Sam Westrick

As of #77, we have a flag `--check` which checks for token-preservation, comment-preservation, and idempotence. (I've found a few edge cases where idempotence is not preserved, so one of the...

Revisiting this now that smlfmt is quite a bit more mature. **Re: don't move independent code?** I think in practice this is really really difficult to accomplish without making huge...

It occurred to me that a simpler way to support this is to allow for UTF-8 bytes but not check for validity of a UTF-8 byte sequence. #74 implements this....

Revisiting this now that smlfmt is more mature. Here's our current output for these examples. ```sml (* ======================================================================== * max width: 80 *) val _ = this is an extremely...

Ah, I have a suspicion this is because the MPL install scripts are only slightly modified from MLton's, so it might be overwriting some of the local install of MLton...

Yeah this would be fantastic to have. Conceptually it seems straightforward for the compiler to provide a polymorphic primitive `toString: 'a -> string`. We could elaborate it into real code...

Yeah, MLton/MPL essentially already have these! MLton calls them "primitive" operations. Primitives can pass through all compilation stages if needed, and different primitives are eliminated (i.e., implemented) by different passes.

Yup! That's what I was imagining above. The primitive can then be eliminated (elaborated into real code) at any point after the monomorphization pass.

One downside of removing the `isBiggish` check is that it can cause deep rightward drift, e.g. the following. (The common pattern of `fun` with a `let in end` body was...

Ah good point -- I hadn't checked if these two heuristics are consistent with each other.