-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index
TypeFamily for Ixed
/At
inconsistent with FunDeps for *WithIndex
#1004
Comments
there is a kind issue: class Functor f => FunctorWithIndex i f | f -> i where -- f :: Type -> Type
-- but
type family Index (s :: Type) :: Type -- s :: Type so these cannot be easily the same. Why one is TF and onther is FD, I don't know exactly. |
It's a little awkward with the kind mismatch as you have to use a somewhat dummy
I'm biased towards TypeFamilies, partly because they just feel more composable and functional, but also largely just because I think instance heads should be very simple and clearly decidable. Various things I want to do that really aren't all that complicated require I also like being able to immediately tell that |
This is matter of taste. I prefer FDs for this use case (and e.g. This is also be a major breaking change, affecting a lot of people for a what I would say a stylistic benefit. Not worth considering. EDIT: |
Is there a particular reason for this inconsistency?
It seems like just using a single
type family Index
for both would be ideal. I realize such a type family would have to be floated up toindexed-traversable
The text was updated successfully, but these errors were encountered: