Implement the other end of an Erlang port command conveniently for SML