This issue is a call to discussion. I want to discuss several things and come to agreement on several issues:
[ ] Decide how to avoid type families duplication.
Currently we have
OneItem (HashMap k v) = (k, v) (from One)
Key (HashMap k v) = k, Val (HashMap k v) = v (from ToPairs)
Item (HashMap k v) = (k, v) (from IsList)
Element (HashMap k v) = v (from ToList)
Looks like a lot of duplication involved when you need to implement (derive) instances for newtype wrappers. Also this hierarchy doesn't look quite neat. So I want to avoid duplication and remove required number of type classes / type families.
This issue is a call to discussion. I want to discuss several things and come to agreement on several issues:
OneItem (HashMap k v) = (k, v)
(fromOne
)Key (HashMap k v) = k
,Val (HashMap k v) = v
(fromToPairs
)Item (HashMap k v) = (k, v)
(fromIsList
)Element (HashMap k v) = v
(fromToList
) Looks like a lot of duplication involved when you need to implement (derive) instances fornewtype
wrappers. Also this hierarchy doesn't look quite neat. So I want to avoid duplication and remove required number of type classes / type families.Please, share your thoughts!