This was recently merged to MLton: https://github.com/MLton/mlton/commit/bf36a151a4b0cc366ba32b5ebea5d8ce25239a0b