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

Swap/change superclass relationships #165

Open
treeowl opened this issue Aug 22, 2021 · 1 comment
Open

Swap/change superclass relationships #165

treeowl opened this issue Aug 22, 2021 · 1 comment

Comments

@treeowl
Copy link

treeowl commented Aug 22, 2021

Currently,

class Functor f => Semialign f
class Semialign f => Zip f
class Zip f => Unzip f

But this makes no sense! Every Functor can unzipWith (perhaps badly), but not every Functor can zipWith. I would recommend doing something like this instead:

class Functor f => Unzip f
class Unzip f => Semialign f
class Semialign f => Zip f
@phadej
Copy link
Collaborator

phadej commented Oct 30, 2021

FWIW, unzip could very well be part of every Functor. There's an argument that it can be efficient.

I don't see much value in doing swapping atm.

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