Add Resolve instances for KindedAddress and Alias
Clarification and motivation
Currently, we have Resolve
instances for AddressOrAlias
and SomeAddressOrAlias
. This occasionally leads to code like this:
getAlias (AddressResolved addr)
AddressResolved
feels rather redundant, considering the function is polymorphic to begin with. It makes sense to introduce instances for KindedAddress
and Alias
as well. AddressOrAlias
instance can then delegate to these instances.
There's an argument to be made about also adding instances for L1Address
and SomeAlias
, and while doable, we can't delegate SomeAddressOrAlias
to those instances, so this will bloat the code somewhat. And besides, those instances boil down to foldConstrained
anyway.
NB: this is low-key blocked by !1350 (merged).
There's a rough prototype in 3310450f
Acceptance criteria
- morley-client exports
Resolve
instances forKindedAddress
andAlias
- redundant
AddressResovled
andAddressAlias
wrappers are removed from calls
Edited by Nikolay Yakimov