I was thinking of (match (resolve ty) ...) instead of a specific check for needs-resolving? since resolve does that check already.