This sounds like a similar approach to OxCaml