aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorJohn Kehayias via Guix-patches via <guix-patches@gnu.org>2021-12-24 19:29:06 +0000
committerLars-Dominik Braun <lars@6xq.net>2022-01-17 20:29:39 +0100
commit67e3de56ec48269ce8315b77ae9b2d71ad29f597 (patch)
tree7af00ea8fe45b7a6db120b2ce7d075ef416c3ade /gnu
parentdc28f4ef85f5dba1a3a1b728087799e99b2e606b (diff)
downloadguix-67e3de56ec48269ce8315b77ae9b2d71ad29f597.tar.gz
guix-67e3de56ec48269ce8315b77ae9b2d71ad29f597.zip
gnu: Add ghc-semirings.
* gnu/packages/haskell-xyz.scm (ghc-semirings): New variable. Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/haskell-xyz.scm34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index a34dcde389..a42baebde6 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -11398,6 +11398,40 @@ semigroup.")
ghc-unordered-containers-bootstrap ghc-hashable-bootstrap))
(properties '((hidden? #t)))))
+(define-public ghc-semirings
+ (package
+ (name "ghc-semirings")
+ (version "0.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/semirings/semirings-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32 "16q535bvjl7395sqkx6zlw48y4fzr7irp44pcp7w9irpn4cncdcr"))))
+ (build-system haskell-build-system)
+ (inputs
+ (list ghc-base-compat-batteries ghc-hashable ghc-unordered-containers))
+ (arguments
+ `(#:cabal-revision
+ ("1" "1c06yhfa053sv3rfz0d72a33l5qb0xmj1b3hy2z7pzxrcay6g1yc")))
+ (home-page "https://github.com/chessai/semirings")
+ (synopsis "Two monoids as one, in holy haskimony")
+ (description
+ "Haskellers are usually familiar with monoids and semigroups. A monoid has an
+appending operation @code{<>} (or @code{mappend}), and an identity element,
+@code{mempty}. A semigroup has an appending @code{<>} operation, but does not
+require a @code{mempty} element. A Semiring has two appending operations,
+@code{plus} and @code{times}, and two respective identity elements,
+@code{zero} and @code{one}. More formally, a Semiring R is a set equipped
+with two binary relations @code{+} and @code{*}, 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 @code{0} annihilates R.")
+ (license license:bsd-3)))
+
(define-public ghc-serialise
(package
(name "ghc-serialise")