Handling covariance/contravariance in syntax formatting.