@hackage semirings0.3.1.2

two monoids as one, in holy haskimony

  • Installation

  • Tested Compilers

  • Dependencies (10)

  • Dependents (20)

    @hackage/number-wall, @hackage/poly, @hackage/streamly-fsnotify, @hackage/wide-word, @hackage/automata, @hackage/interval-patterns, Show all…
  • Package Flags

      hashable
       (on by default)

      You can disable the use of the hashable package using `-f-hashable`.

      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.

      containers
       (on by default)

      You can disable the use of the containers package using `-f-containers`.

      Disabling this may be useful for accelerating builds in sandboxes for expert users.

      unordered-containers
       (on by default)

      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.

      vector
       (on by default)

      You can disable the use of the vector package using `-f-vector`.

      Disabling this may be useful for accelerating builds in sandboxes for expert users.

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.