Aliases.add currently has a somewhat more involved contract than necessary: it always returns (in the add_result record) a canonical_element with no coercion and an alias_of_demoted_element with a correspondingly adjusted coercion. This does not actually help anything - the sole caller doesn't require that canonical_element has no coercion. Rather, it requires that the returned values are now aliases up to coercion. This is of course precisely what Aliases.add accomplishes, so we can just as happily return the original arguments un-faffed-with.
Aliases.add
currently has a somewhat more involved contract than necessary: it always returns (in theadd_result
record) acanonical_element
with no coercion and analias_of_demoted_element
with a correspondingly adjusted coercion. This does not actually help anything - the sole caller doesn't require thatcanonical_element
has no coercion. Rather, it requires that the returned values are now aliases up to coercion. This is of course precisely whatAliases.add
accomplishes, so we can just as happily return the original arguments un-faffed-with.