summaryrefslogtreecommitdiff
path: root/gnu/packages/haskell-xyz.scm
diff options
context:
space:
mode:
authorzamfofex <zamfofex@twdb.moe>2023-06-14 09:48:52 -0300
committerLudovic Courtès <ludo@gnu.org>2023-07-07 15:30:23 +0200
commit6b10501defee25e6ea87ed597d5a344a4e7410bf (patch)
tree6455ba71eb86a0a7e800bd9fb4b4ec1cabfb7356 /gnu/packages/haskell-xyz.scm
parent0b2b9398477c9c901ce0e301c6ea03a7eb4742f6 (diff)
gnu: Add ghc-dependent-sum.
* gnu/packages/haskell-xyz.scm (ghc-dependent-sum): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/haskell-xyz.scm')
-rw-r--r--gnu/packages/haskell-xyz.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index a4c1ba2544..a546cd2a4b 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -13165,6 +13165,34 @@ and high speed.")
arguments to mappend does not matter.")
(license license:bsd-3)))
+(define-public ghc-dependent-sum
+ (package
+ (name "ghc-dependent-sum")
+ (version "0.7.2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (hackage-uri "dependent-sum" version))
+ (sha256
+ (base32
+ "1frw5965v8i6xqdgs95gg8asgdqcqnmfahz0pmbwiaw5ybn62rc2"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "dependent-sum")))
+ (inputs (list ghc-constraints-extras ghc-some))
+ (arguments
+ `(#:cabal-revision ("1"
+ "0qybk8x6gyvg8pgf84mywlfajlcvg9pp4rs1wfn9fa7ns6sms88n")))
+ (home-page "https://github.com/obsidiansystems/dependent-sum")
+ (synopsis "Dependent sum type")
+ (description
+ "This package provides a dependent sum is a generalization of a
+particular way of thinking about the @code{Either} type. @code{Either a b}
+can be thought of as a 2-tuple @code{(tag, value)}, where the value of the tag
+determines the type of the value. In particular, either @code{tag = Left} and
+@code{value :: a} or @code{tag = Right} and @code{value :: b}. This package
+allows you to define your own dependent sum types by using your own \"tag\"
+types.")
+ (license license:public-domain)))
+
(define-public ghc-unsafe
(package
(name "ghc-unsafe")