Rewriting * when types are predictable