extension PureYAML.Tagged { /// Key identity for duplicate detection: the resolved scalar value plus the /// key's effective tag (its carried tag, or the implicit tag of the resolved /// value). Two keys are the same key iff both match. Using the resolved value /// rather than the source spelling makes `0x1` and `1` (both `int(1)`) /// collide while `1` (`int`) and `"1"` (`str`) do not, and keeps /// custom-tagged keys (`!foo 1` vs `!bar 1`) distinct. struct MappingKeyIdentity: Hashable { var value: PureYAML.Model.Value var tag: String? } }