Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

potential surprise bonus features of Mu extending ~> #80

Closed
ceedubs opened this issue Oct 2, 2018 · 1 comment
Closed

potential surprise bonus features of Mu extending ~> #80

ceedubs opened this issue Oct 2, 2018 · 1 comment

Comments

@ceedubs
Copy link
Contributor

ceedubs commented Oct 2, 2018

Mu is defined as extending Algebra[F, ?] ~> Id. In addition to inheriting the apply method from ~>, this also means that it inherits some methods like andThen, compose, and, and or.

In a project of mine I was using Mu to represent regular expressions, and this caught me by surprise, because I tried to add andThen and or syntax to combine two regular expressions and ran into a name collision with the methods from ~>.

I'm definitely not saying that this needs to be changed. I'm not even using Mu to represent regular expressions anymore, and nobody is using that library anyway. But I just thought that I would bring it up so to ensure that it's a conscious decision to inherit these other methods. Feel free to close this out without changes.

@andyscott
Copy link
Member

Changing Mu so that it doesn't extend FunctionK seems pretty reasonable to me. I'll leave this open until I (or anyone else) gets a chance to make the change. Thanks for the report!

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

No branches or pull requests

2 participants