[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/25: gnu: Add ghc-generic-random.
From: |
guix-commits |
Subject: |
06/25: gnu: Add ghc-generic-random. |
Date: |
Fri, 29 May 2020 11:00:58 -0400 (EDT) |
lfam pushed a commit to branch master
in repository guix.
commit 89e9082e4e90c9e593ed8584ff6978ecf91dfe24
Author: John Soo <jsoo1@asu.edu>
AuthorDate: Fri Apr 10 21:09:02 2020 -0700
gnu: Add ghc-generic-random.
* gnu/packages/haskell-xyz.scm (ghc-generic-random): New variable.
Signed-off-by: Leo Famulari <leo@famulari.name>
---
gnu/packages/haskell-xyz.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index fb26de2..d828501 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -4481,6 +4481,46 @@ specific Windows, Mac, and Linux file system event
notification.")
deriving mechanism in Haskell to arbitrary classes.")
(license license:bsd-3)))
+(define-public ghc-generic-random
+ (package
+ (name "ghc-generic-random")
+ (version "1.2.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/generic-random/"
+ "generic-random-" version ".tar.gz"))
+ (sha256
+ (base32 "130lmblycxnpqbsl7vf6a90zccibnvcb5zaclfajcn3by39007lv"))))
+ (build-system haskell-build-system)
+ (inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
+ (native-inputs
+ `(("ghc-inspection-testing" ,ghc-inspection-testing)))
+ (arguments
+ `(#:cabal-revision
+ ("1" "1d0hx41r7yq2a86ydnfh2fv540ah8cz05l071s2z4wxcjw0ymyn4")))
+ (home-page
+ "https://github.com/lysxia/generic-random")
+ (synopsis
+ "Generic random generators for QuickCheck")
+ (description
+ "Derive instances of @code{Arbitrary} for QuickCheck, with various options
+to customize implementations.
+
+Automating the arbitrary boilerplate also ensures that when a type changes to
+have more or fewer constructors, then the generator either fixes itself to
+generate that new case (when using the uniform distribution) or causes a
+compilation error so you remember to fix it (when using an explicit
+distribution).
+
+This package also offers a simple (optional) strategy to ensure termination
+for recursive types: make @code{Test.QuickCheck.Gen}'s size parameter decrease
+at every recursive call; when it reaches zero, sample directly from a
+trivially terminating generator given explicitly (@code{genericArbitraryRec}
+and @code{withBaseCase}) or implicitly (@code{genericArbitrary'}).")
+ (license license:expat)))
+
(define-public ghc-generics-sop
(package
(name "ghc-generics-sop")
- branch master updated (1ca44ae -> 9ff667e), guix-commits, 2020/05/29
- 04/25: gnu: Add ghc-cborg-json., guix-commits, 2020/05/29
- 02/25: gnu: Add ghc-data-fix., guix-commits, 2020/05/29
- 03/25: gnu: Add ghc-cborg., guix-commits, 2020/05/29
- 08/25: gnu: Add ghc-spoon., guix-commits, 2020/05/29
- 06/25: gnu: Add ghc-generic-random.,
guix-commits <=
- 22/25: gnu: Add ghc-prettyprinter-ansi-terminal., guix-commits, 2020/05/29
- 18/25: gnu: Add ghc-repline., guix-commits, 2020/05/29
- 19/25: gnu: Add ghc-haskeline-0.8., guix-commits, 2020/05/29
- 09/25: gnu: Add ghc-special-values., guix-commits, 2020/05/29
- 21/25: gnu: Add ghc-prettyprinter-1.6., guix-commits, 2020/05/29
- 11/25: gnu: Add ghc-pretty-simple., guix-commits, 2020/05/29
- 15/25: gnu: Add ghc-managed., guix-commits, 2020/05/29
- 23/25: gnu: Add ghc-generic-random-1.3.0.1., guix-commits, 2020/05/29
- 16/25: gnu: Add ghc-lens-family-core., guix-commits, 2020/05/29
- 17/25: gnu: Add ghc-prettyprinter., guix-commits, 2020/05/29