Shakespeare and the ends of comedy