Maybe it could be ported to SML, because:
> "It is distinctive among widely used languages in that it has a formal specification, given as typing rules and operational semantics in The Definition of Standard ML (1990, revised and simplified as The Definition of Standard ML (Revised) in 1997)."
https://en.wikipedia.org/wiki/Standard_ML
edit, the specification itself: http://sml-family.org/sml97-defn.pdf