semirings: two monoids as one, in holy haskimony
Haskellers are usually familiar with monoids and semigroups. A monoid has an appending operation <> (or mappend),
and an identity element, mempty. A semigroup has an appending <> operation, but does not require a mempty element.
A Semiring has two appending operations, plus and times, and two respective identity elements, zero and one.
More formally, a Semiring R is a set equipped with two binary relations + and *, such that:
(R,+) is a commutative monoid with identity element 0,
(R,*) is a monoid with identity element 1,
(*) left and right distributes over addition, and
multiplication by '0' annihilates R.
[Skip to Readme]
Flags
Manual Flags
| Name | Description | Default |
|---|---|---|
| hashable | You can disable the use of the Disabling this may be useful for accelerating builds in sandboxes for expert users. Note: `-f-hashable` implies `-f-unordered-containers`, as we are necessarily not able to supply those instances as well. | Enabled |
| containers | You can disable the use of the Disabling this may be useful for accelerating builds in sandboxes for expert users. | Enabled |
| unordered-containers | You can disable the use of the `unordered-containers` package using `-f-unordered-containers`. Disabling this may be useful for accelerating builds in sandboxes for expert users. | Enabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- semirings-0.4.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.0.0, 0.1.0, 0.1.1, 0.1.2, 0.1.3.0, 0.2.0.0, 0.2.0.1, 0.2.1.0, 0.2.1.1, 0.3.0.0, 0.3.1.0, 0.3.1.1, 0.3.1.2, 0.4, 0.4.1, 0.4.2, 0.5, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6, 0.7 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.5 && <5), containers (>=0.5.4 && <0.6.1.0), hashable (>=1.1 && <1.3), integer-gmp, nats (>=0.1 && <2), semigroups, tagged, transformers, unordered-containers (>=0.2 && <0.3) [details] |
| Tested with | ghc ==7.4.1, ghc ==7.4.2, ghc ==7.6.1, ghc ==7.6.2, ghc ==7.8.1, ghc ==7.8.3, ghc ==7.8.4, ghc ==7.10.1, ghc ==7.10.2, ghc ==7.10.3, ghc ==8.0.1, ghc ==8.0.2, ghc ==8.2.1, ghc ==8.2.2, ghc ==8.4.1, ghc ==8.4.2, ghc ==8.4.3, ghc ==8.4.4, ghc ==8.6.1, ghc ==8.6.2, ghc ==8.6.3, ghc ==8.6.4, ghc ==8.6.5 |
| License | BSD-3-Clause |
| Copyright | Copyright (C) 2018 chessai |
| Author | chessai |
| Maintainer | chessai <chessai1996@gmail.com> |
| Uploaded | by chessai at 2019-05-01T17:21:39Z |
| Category | Algebra, Data, Data Structures, Math, Maths, Mathematics |
| Home page | http://github.com/chessai/semirings |
| Bug tracker | http://github.com/chessai/semirings/issues |
| Source repo | head: git clone git://github.com/chessai/semirings.git |
| Reverse Dependencies | 18 direct, 8670 indirect [details] |
| Downloads | 23228 total (64 in the last 30 days) |
| Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2019-05-01 [all 1 reports] |