Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ekmett/semigroups
Haskell 98 semigroups
https://github.com/ekmett/semigroups
Last synced: 6 days ago
JSON representation
Haskell 98 semigroups
- Host: GitHub
- URL: https://github.com/ekmett/semigroups
- Owner: ekmett
- License: other
- Created: 2011-01-07T23:49:55.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2023-03-28T17:07:28.000Z (over 1 year ago)
- Last Synced: 2024-10-29T22:30:03.672Z (7 days ago)
- Language: Haskell
- Homepage: http://hackage.haskell.org/package/semigroups
- Size: 512 KB
- Stars: 62
- Watchers: 11
- Forks: 29
- Open Issues: 2
-
Metadata Files:
- Readme: README.markdown
- Changelog: CHANGELOG.markdown
- License: LICENSE
Awesome Lists containing this project
README
semigroups
==========[![Hackage](https://img.shields.io/hackage/v/semigroups.svg)](https://hackage.haskell.org/package/semigroups) [![Build Status](https://github.com/ekmett/semigroups/workflows/Haskell-CI/badge.svg)](https://github.com/ekmett/semigroups/actions?query=workflow%3AHaskell-CI)
Haskellers are usually familiar with monoids. A monoid has an appending operation `<>` or `mappend` and an identity element `mempty`. A Semigroup has an append `<>`, but does not require an `mempty` element. A Monoid can be made a Semigroup with just `instance Semigroup MyMonoid`
More formally, a semigroup is an algebraic structure consisting of a set together with an associative binary operation. A semigroup generalizes a monoid in that there might not exist an identity element. It also (originally) generalized a group (a monoid with all inverses) to a type where every element did not have to have an inverse, thus the name semigroup.
`Data.Semigroup` and `Data.List.NonEmpty` were added to `base` as of 4.9.0.0. This package now offers a backwards-compatible API and some tools for deriving semigroups with generics.
Contact Information
-------------------Contributions and bug reports are welcome!
Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.
-Edward Kmett