This paper presents a novel closure conversion strategy which is part of MLton, a whole-program compiler for Standard ML. Unlike other implementations, MLton performs closure-conversion at an early stage to translate programs to a simply-typed rst-order intermediate language upon which most optimizations are performed. Closure conversion is guided by a global control-ow analysis. Like previous work on defunctionalization, the translation implements closures as elements of datatypes, and uses dispatches at certain call-sites to select the appropriate function to call. However, our use of control-ow analysis leads to a signiicantly improved translation. There are two notable contributions of our work: 1. The translation uses a general ow-analysis framework which includes OCFA. The datatypes in the target language capture the results of the analysis. MLton uses the analysis to insert coercions to translate between diierent representations of a closure to preserve type correctness of the target language program. 2. The translation is practical. Experimental results over a range of benchmarks including large real-world programs such as the compiler itself and the ML-Kit TBE + 97] indicate that the compile-time cost of ow analysis and closure conversion is extremely small, and that the dispatches and coercions inserted by the algorithm are dynamically infrequent. Runtime performance is often more than a factor of two faster than Standard ML of New Jersey.