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

Monoid Instance for FingerTree? #38

Open
solomon-b opened this issue Sep 20, 2021 · 2 comments
Open

Monoid Instance for FingerTree? #38

solomon-b opened this issue Sep 20, 2021 · 2 comments

Comments

@solomon-b
Copy link

Is there any reason not to include a monoid instance for FingerTree?

instance monoidFingerTree :: (Monoid v, Measured a v) => Monoid (FingerTree v a) where
  mempty = Empty
@hdgarrood
Copy link
Owner

That seems fine, especially since the Semigroup instance is already there. I think the most likely explanations are either that I wrote this before Monoid was in Prelude and I couldn't be bothered to add the dependency initially, and/or that I've not found a use for it.

@solomon-b
Copy link
Author

Sorry for the slow reply. Its not strictly necessary but it is nice to have for the sake of completeness.

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