summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorArun Isaac <arunisaac@systemreboot.net>2022-08-31 19:38:29 +0530
committerArun Isaac <arunisaac@systemreboot.net>2022-09-08 20:56:08 +0530
commit8d34df72cbd400b04cc4c8e2b3d9102a1f9bb013 (patch)
treef741db68e16af36252be13233572d94c7468b5df /gnu/packages/python-xyz.scm
parent685dd8fb1359287bb3dd4ea16c757662856b242a (diff)
gnu: Add python-pymonad.
* gnu/packages/python-xyz.scm (python-pymonad): New variable.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm39
1 files changed, 38 insertions, 1 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 79e4c2cdab..21106bf832 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29,7 +29,7 @@
;;; Copyright © 2016-2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2016, 2017, 2021, 2022 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
-;;; Copyright © 2016, 2017, 2018, 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2016, 2017, 2018, 2021, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
@@ -30746,3 +30746,40 @@ platform using the ActivityPub protocol.")
"@code{python-lief} is a cross platform library which can parse, modify
and abstract ELF, PE and MachO formats.")
(license license:asl2.0)))
+
+(define-public python-pymonad
+ (package
+ (name "python-pymonad")
+ (version "2.4.0")
+ ;; The tests are incomplete in the PyPI archive.
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jasondelaat/pymonad")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ci1mpydldiyg9qv6d19ljhfh7wxlrl2k4mlvqd9bm7dqvpdjsx7"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "./run_tests.sh")))))))
+ (home-page "https://github.com/jasondelaat/pymonad")
+ (synopsis "Monadic style functional programming for Python")
+ (description "@code{python-pymonad} implements data structures typically
+available in purely functional or functional first programming languages such
+as Haskell and F#. Included are
+
+@itemize
+@item Monad and Monoid data types with several common monads such as Maybe and
+State
+@item Useful tools such as the @code{@@curry} decorator for defining curried
+functions
+@item Type annotations to help ensure correct usage
+@end itemize")
+ (license license:bsd-3)))