Skip to content
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

instances for other Integral indexes? #15

Open
aryairani opened this issue Oct 7, 2021 · 1 comment
Open

instances for other Integral indexes? #15

aryairani opened this issue Oct 7, 2021 · 1 comment

Comments

@aryairani
Copy link

aryairani commented Oct 7, 2021

We have some Word64-indexed types, and having to scatter fromIntegral all over to compensate outweighs the convenience of using like ifor_ f xs over for_ f (xs `zip` [0..]) in a smaller number spots.

WDYT about replacing instance FunctorWithIndex Int [] with instance Integral i => FunctorWithIndex i [], and so on?

@phadej
Copy link
Collaborator

phadej commented Oct 8, 2021

instance Integral i => FunctorWithIndex i [], won't satisfy functional dependency and wreak havoc the type inference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants