types+grammar: revisions to ch5 per #183