types+grammar: more work on ch1