Narrow inferred type for withReader/withWriter closure parameters