Hacky library for automatically generating boilerplate code from SML datatypes