Initial version, with working TH

Only a tiny subset is wrapped, but the TH machinery seems to be already useful to scrap boilerplate.
Definitely it would be nice to not pass the arg number.