implement a simple SML generator from the Document type, I'm struggling a bit with representing everything in a concise way