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

Consider adding Group type class instance #5

Open
gwils opened this issue Jul 11, 2017 · 1 comment
Open

Consider adding Group type class instance #5

gwils opened this issue Jul 11, 2017 · 1 comment

Comments

@gwils
Copy link
Member

gwils commented Jul 11, 2017

Given that we've chosen addition as the monoid for money, we can define an instance for Group too.
But where should we get group from? The groups package seems almost unused, and I can't find its source on github.

Maybe we should depend on the albegra package instead.
It's worth looking at that package. As well as group, what other algebraic structures does it provide that money fits?

@frasertweedale
Copy link
Collaborator

groups seems much more popular actually ; many more downloads, and many more in last 30 days than algebra.

OTOH, algebra is authored by Ed.

OTOOH

13:06 <nkpart> The revdeps are empty for this package, so I think it was probably a playground

But if we go for algebra the abstraction we fit http://hackage.haskell.org/package/algebra-4.3/docs/Numeric-Additive-Group.html.

As for other structures, we are also Abelian (commutative group) though this does not define any new operations, just provides additional structure to the combining operation.

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