From 555a3b6f5fa1cdd963b50727f63a42e82e7ab0f4 Mon Sep 17 00:00:00 2001 From: John Soo Date: Fri, 10 Apr 2020 21:04:11 -0700 Subject: [PATCH 01/25] gnu: Add ghc-inspection-testing. * gnu/packages/haskell-check.scm (ghc-inspection-testing): New variable. --- gnu/packages/haskell-check.scm | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/haskell-check.scm b/gnu/packages/haskell-check.scm index c6e89460ea..6defff224c 100644 --- a/gnu/packages/haskell-check.scm +++ b/gnu/packages/haskell-check.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018 Tonton ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2019 Timothy Sample +;;; Copyright © 2020 John Soo ;;; ;;; This file is part of GNU Guix. ;;; @@ -963,3 +964,43 @@ values (similar to @code{toEnum} but for any algebraic data type). This can be used for SmallCheck-style systematic testing, QuickCheck-style random testing, and hybrids of the two.") (license license:bsd-3))) + +(define-public ghc-inspection-testing + (package + (name "ghc-inspection-testing") + (version "0.4.2.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/inspection-testing/" + "inspection-testing-" version ".tar.gz")) + (sha256 + (base32 + "1bppz99p6ix6hah8lbr9mapl2zxgmkg9i7h6hk8wq6zf54hwz3yp")))) + (build-system haskell-build-system) + (home-page + "https://github.com/nomeata/inspection-testing") + (synopsis "GHC plugin to do inspection testing") + (description + "Some carefully crafted libraries make promises to their users beyond +functionality and performance. + +Examples are: Fusion libraries promise intermediate data structures to be +eliminated. Generic programming libraries promise that the generic +implementation is identical to the hand-written one. Some libraries may +promise allocation-free or branch-free code. + +Conventionally, the modus operandi in all these cases is that the library +author manually inspects the (intermediate or final) code produced by the +compiler. This is not only tedious, but makes it very likely that some change, +either in the library itself or the surrounding eco-system, breaks the +library's promised without anyone noticing. + +This package provides a disciplined way of specifying such properties, and +have them checked by the compiler. This way, this checking can be part of the +ususal development cycle and regressions caught early. + +See the documentation in \"Test.Inspection\" or the project webpage for more +examples and more information.") + (license license:expat))) -- 2.26.0