From e72e083b36d3ad12aa81ee7cbc325c4f61799187 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Fri, 24 Dec 2021 13:52:16 -0500
Subject: [PATCH 3/5] gnu: Add ghc-quickcheck-classes.
* gnu/packages/haskell-check.scm (ghc-quickcheck-classes): New variable.
---
gnu/packages/haskell-check.scm | 46 ++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
@@ -13,6 +13,7 @@
;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
;;; Copyright © 2020 Carlo Holl <carloholl@gmail.com>
+;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,7 @@
(define-module (gnu packages haskell-check)
#:use-module (gnu packages)
#:use-module (gnu packages haskell-crypto)
+ #:use-module (gnu packages haskell-web)
#:use-module (gnu packages haskell-xyz)
#:use-module (guix build-system haskell)
#:use-module (guix download)
@@ -1056,6 +1058,50 @@ (define-public ghc-inspection-testing
examples and more information.")
(license license:expat)))
+(define-public ghc-quickcheck-classes
+ (package
+ (name "ghc-quickcheck-classes")
+ (version "0.6.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://hackage.haskell.org/package/quickcheck-classes/quickcheck-classes-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32 "19iw15mvb7gws3ljdxqwsbb4pmfc0sfflf8szgmrhiqr3k82mqv2"))))
+ (build-system haskell-build-system)
+ (inputs
+ (list ghc-quickcheck
+ ghc-primitive
+ ghc-primitive-addr
+ ghc-quickcheck-classes-base
+ ghc-aeson
+ ghc-semigroupoids
+ ghc-semirings
+ ghc-vector))
+ (native-inputs
+ (list ghc-base-orphans
+ ghc-tagged
+ ghc-base-orphans
+ ghc-tagged
+ ghc-tasty
+ ghc-tasty-quickcheck))
+ (home-page "https://github.com/andrewthad/quickcheck-classes#readme")
+ (synopsis "QuickCheck common typeclasses")
+ (description
+ "This library provides QuickCheck properties to ensure that typeclass
+instances adhere to the set of laws that they are supposed to. There are
+other libraries that do similar things, such as @code{genvalidity-hspec} and
+@code{checkers}. This library differs from other solutions by not introducing
+any new typeclasses that the user needs to learn. /Note:/ on GHC < 8.5, this
+library uses the higher-kinded typeclasses (@code{Data.Functor.Classes.Show1},
+@code{Data.Functor.Classes.Eq1}, @code{Data.Functor.Classes.Ord1}, etc.), but
+on GHC >= 8.5, it uses @code{-XQuantifiedConstraints} to express these
+constraints more cleanly.")
+ (license license:bsd-3)))
+
(define-public ghc-quickcheck-classes-base
(package
(name "ghc-quickcheck-classes-base")
--
2.34.1