purescript/purescript-foldable-traversable

should the Indexed classes have their fundep?

Closed this issue · 3 comments

All the indexed classes have a f -> i fundep. Isn't it conceivable, though, that a given f could have instances for different i types? With the fundep, you'd have to use Newtype to get this behavior.

Do you have a specific example scenario?

An ordered StringMap could be indexed by both Strings and Integers.

Having the fundep should help inference and will improve error messages, so I'm tempted to say that I'd rather keep it. This example, for me, isn't compelling enough to give up what the fundep gives us.