-
Notifications
You must be signed in to change notification settings - Fork 1
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
Export ArithK #2
Conversation
Thanks for the PR! All the changes look good, but I'm wondering: what use-case do you have for |
Here's the code I've written that uses it https://github.com/LightAndLight/ranged/blob/master/src/Data/Ranged.hs#L25 |
I see, that does make sense! If it's ok with you, I'll move it to an exposed internal module and document it further rather than just export it as is. Also, would open type families be useful for you, so you could just add new cases to the existing operators? Edit: it seems like open type families don't work with GHC < 8.2. I need to look into this some more still. |
* Move current Arithmetic module to Arithmetic.Internal * Rename type families to Add/Mul, etc * Make all type families open * New Arithmetic module that just re-exports polykinded infix synonyms for the type families
* Move current Arithmetic module to Arithmetic.Internal * Rename type families to Add/Mul, etc * Make all type families open * New Arithmetic module that just re-exports polykinded infix synonyms for the type families Closes #2
Awesome, thanks :) |
* Move current Arithmetic module to Arithmetic.Internal * Rename type families to Add/Mul, etc * Make all type families open for GHC >= 8.2 * New Arithmetic module that just re-exports polykinded infix synonyms for the type families Closes #2
Unfortunately I can't get extending open type families to work at present, so I'm just going to push through the smaller fix to expose the kind families for you and leave that as a future improvement in #3. |
* Move current Arithmetic module to Arithmetic.Internal * Rename type families to Add/Mul, etc * New Arithmetic module that just re-exports polykinded infix synonyms for the type families NB. GHC 8.0.1 bug causes tests to fail to compile on -O1 or -O2 Closes #2
I've been fooling around with this packing and found that it's been helpful to have access to ArithK.