Semantic Model (summary) Make sure you have a semantic model worked out Capture the meaning of your input language Keep the model simple! Translation is tricky without one You won't get much typechecking either Embed in native datatypes when possible Lists, Strings, Tuples, Numbers, etc. Variables Functions Make new types and constructors when necessary (or helpful) Ocaml datatypes are recursive, branching, polymorphic Very language-like All user-visible errors will use your type names Rename types when useful (eg: "file")