1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
3 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
4 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
5 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2016 ng0 <ng0@infotropique.org>
7 ;;; Copyright © 2016 David Craven <david@craven.ch>
8 ;;; Copyright © 2017 Danny Milosavljevic <dannym@scratchpost.org>
9 ;;; Copyright © 2017 rsiddharth <s@ricketyspace.net>
10 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages haskell-check)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages haskell)
30 #:use-module (guix build-system haskell)
31 #:use-module (guix download)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (guix utils))
36 (define-public ghc-tasty-ant-xml
38 (name "ghc-tasty-ant-xml")
44 "https://hackage.haskell.org/package/tasty-ant-xml/tasty-ant-xml-"
49 "0pgz2lclg2hp72ykljcbxd88pjanfdfk8m5vb2qzcyjr85kwrhxv"))))
50 (build-system haskell-build-system)
52 `(("ghc-generic-deriving" ,ghc-generic-deriving)
56 ("ghc-tagged" ,ghc-tagged)
57 ("ghc-tasty" ,ghc-tasty)))
59 "https://github.com/ocharles/tasty-ant-xml")
61 "Render tasty output to XML for Jenkins")
63 "A tasty ingredient to output test results in XML, using the Ant
64 schema. This XML can be consumed by the Jenkins continuous integration
66 (license license:bsd-3)))
68 (define-public ghc-tasty-smallcheck
70 (name "ghc-tasty-smallcheck")
76 "https://hackage.haskell.org/package/tasty-smallcheck/tasty-smallcheck-"
81 "1n66ngzllf3xrlqykwszlkwsi96n5nkm7xbpfq7774vpvfnafjri"))))
82 (build-system haskell-build-system)
84 `(("ghc-tasty" ,ghc-tasty)
85 ("ghc-smallcheck" ,ghc-smallcheck)
86 ("ghc-async" ,ghc-async)
87 ("ghc-tagged" ,ghc-tagged)))
88 (home-page "https://documentup.com/feuerbach/tasty")
89 (synopsis "SmallCheck support for the Tasty test framework")
90 (description "This package provides SmallCheck support for the Tasty
91 Haskell test framework.")
92 (license license:bsd-3)))
94 (define-public ghc-tasty-quickcheck
96 (name "ghc-tasty-quickcheck")
102 "https://hackage.haskell.org/package/tasty-quickcheck/"
103 "tasty-quickcheck-" version ".tar.gz"))
106 "15rjxib5jmjq0hzj47x15kgp3awc73va4cy1pmpf7k3hvfv4qprn"))))
107 (build-system haskell-build-system)
109 `(("ghc-quickcheck" ,ghc-quickcheck)
110 ("ghc-tagged" ,ghc-tagged)
111 ("ghc-tasty" ,ghc-tasty)
112 ("ghc-random" ,ghc-random)
113 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
114 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
115 ("ghc-pcre-light" ,ghc-pcre-light)))
116 (home-page "http://documentup.com/feuerbach/tasty")
117 (synopsis "QuickCheck support for the Tasty test framework")
118 (description "This package provides QuickCheck support for the Tasty
119 Haskell test framework.")
120 (license license:expat)))
122 (define-public ghc-tasty-golden
124 (name "ghc-tasty-golden")
130 "https://hackage.haskell.org/package/tasty-golden/tasty-golden-"
135 "0pcf5hsyp5mmbqn7krdm49jxpkjm6rb4j83j28f76h7q55dzm1wy"))))
136 (build-system haskell-build-system)
138 `(("ghc-temporary" ,ghc-temporary)
139 ("ghc-tasty" ,ghc-tasty)
141 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
142 ("ghc-tagged" ,ghc-tagged)
143 ("ghc-async" ,ghc-async)
144 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
145 ("ghc-temporary-rc" ,ghc-temporary-rc)))
147 "https://github.com/feuerbach/tasty-golden")
148 (synopsis "Golden tests support for tasty")
150 "This package provides support for 'golden testing'. A @dfn{golden test}
151 is an IO action that writes its result to a file. To pass the test, this
152 output file should be identical to the corresponding 'golden' file, which
153 contains the correct result for the test.")
154 (license license:expat)))
156 ;; This package builds `clock` without tests, since the tests rely on tasty
157 ;; and tasty-quickcheck, which in turn require clock to build.
158 (define ghc-clock-bootstrap
160 (name "ghc-clock-bootstrap")
166 "https://hackage.haskell.org/package/"
168 "clock-" version ".tar.gz"))
170 (base32 "1ncph7vi2q6ywwc8ysxl1ibw6i5dwfvln88ssfazk8jgpj4iyykw"))))
171 (build-system haskell-build-system)
172 (arguments `(#:tests? #f)) ;; Testing suite depends on tasty and
173 ;; tasty-quickcheck, which need clock to build.
174 (home-page "https://hackage.haskell.org/package/clock")
175 (synopsis "High-resolution clock for Haskell")
176 (description "A package for convenient access to high-resolution clock and
177 timer functions of different operating systems via a unified API.")
178 (license license:bsd-3)))
180 (define-public ghc-tasty
188 "https://hackage.haskell.org/package/tasty/tasty-"
193 "1chapivmmwsb1ghwagvdm80bfj3hdk75m94z4p212ng2i4ghpjkx"))))
194 (build-system haskell-build-system)
196 `(("ghc-stm" ,ghc-stm)
198 ("ghc-tagged" ,ghc-tagged)
199 ("ghc-regex-tdfa-rc" ,ghc-regex-tdfa-rc)
200 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
201 ("ghc-unbounded-delays" ,ghc-unbounded-delays)
202 ("ghc-async" ,ghc-async)
203 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
204 ("ghc-clock-bootstrap" ,ghc-clock-bootstrap)))
205 (home-page "http://documentup.com/feuerbach/tasty")
206 (synopsis "Modern and extensible testing framework")
207 (description "Tasty is a modern testing framework for Haskell. It lets
208 you combine your unit tests, golden tests, QuickCheck/SmallCheck properties,
209 and any other types of tests into a single test suite.")
210 (license license:expat)))
212 (define-public ghc-tasty-hunit
214 (name "ghc-tasty-hunit")
220 "https://hackage.haskell.org/package/tasty-hunit/tasty-hunit-"
225 "08qnxaw34wfnzi9irs1jd4d0zczqm3k5ffkd4zwhkz0dflmgq7mf"))))
226 (build-system haskell-build-system)
228 `(("ghc-tasty" ,ghc-tasty)))
229 (home-page "http://documentup.com/feuerbach/tasty")
230 (synopsis "HUnit support for the Tasty test framework")
231 (description "This package provides HUnit support for the Tasty Haskell
233 (license license:expat)))
235 (define-public ghc-tasty-kat
237 (name "ghc-tasty-kat")
241 (uri (string-append "https://hackage.haskell.org/package/"
242 "tasty-kat/tasty-kat-" version ".tar.gz"))
245 "14yvlpli6cv6bn3kh8mlfp4x1l6ns4fvmfv6hmj75cvxyzq029d7"))))
246 (build-system haskell-build-system)
248 `(("ghc-tasty" ,ghc-tasty)
250 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
251 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
252 (home-page "https://github.com/vincenthz/tasty-kat")
253 (synopsis "Known Answer Tests (KAT) framework for tasty")
255 "This package provides a @dfn{Known Answer Tests} (KAT) framework for
257 (license license:expat)))
259 (define-public ghc-tasty-th
261 (name "ghc-tasty-th")
267 "https://hackage.haskell.org/package/tasty-th/tasty-th-"
271 "0dff9si8i1qp0s7p4hlk0l29vq7wxfglw6mvlgmld43h7rllv88q"))))
272 (build-system haskell-build-system)
274 `(("ghc-tasty" ,ghc-tasty)))
275 (home-page "https://github.com/bennofs/tasty-th")
276 (synopsis "Automatically generate tasty TestTrees")
278 "Tasty-th automatically generates tasty TestTrees from functions of the
279 current module, using TemplateHaskell. This is a fork the original
280 test-framework-th package, modified to work with tasty instead of
282 (license license:bsd-3)))
284 (define-public ghc-tasty-rerun
286 (name "ghc-tasty-rerun")
291 "https://hackage.haskell.org/package/tasty-rerun/"
292 "tasty-rerun-" version ".tar.gz"))
295 "0yg8cicfn3qaazvp4rbanzy3dyk95k3y1kkd4bykvkl9v4076788"))))
296 (build-system haskell-build-system)
298 `(("ghc-mtl" ,ghc-mtl)
299 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
300 ("ghc-reducers" ,ghc-reducers)
301 ("ghc-split" ,ghc-split)
303 ("ghc-tagged" ,ghc-tagged)
304 ("ghc-tasty" ,ghc-tasty)))
305 (home-page "https://github.com/ocharles/tasty-rerun")
306 (synopsis "Run tests by filtering the test tree")
307 (description "This package adds the ability to run tests by filtering the
308 test tree based on the result of a previous test run. You can use this to run
309 only those tests that failed in the last run, or to only run the tests that have
310 been added since previous test run.")
311 (license license:bsd-3)))
313 (define-public ghc-quickcheck-instances
315 (name "ghc-quickcheck-instances")
321 "https://hackage.haskell.org/package/"
322 "quickcheck-instances/quickcheck-instances-"
326 "1wwvkzpams7i0j7nk5qj8vvhj8x5zcbgbgrpczszgvshva4bkmfx"))))
327 (build-system haskell-build-system)
329 `(("ghc-old-time" ,ghc-old-time)
330 ("ghc-unordered-containers" ,ghc-unordered-containers)
331 ("ghc-hashable" ,ghc-hashable)
332 ("ghc-quickcheck" ,ghc-quickcheck)
333 ("ghc-scientific" ,ghc-scientific)
334 ("ghc-vector" ,ghc-vector)
335 ("ghc-text" ,ghc-text)))
337 "https://github.com/aslatter/qc-instances")
338 (synopsis "Common quickcheck instances")
339 (description "This package provides QuickCheck instances for types
340 provided by the Haskell Platform.")
341 (license license:bsd-3)))
343 (define-public ghc-quickcheck-unicode
345 (name "ghc-quickcheck-unicode")
351 "https://hackage.haskell.org/package/quickcheck-unicode/"
352 "quickcheck-unicode-" version ".tar.gz"))
355 "0s43s1bzbg3gwsjgm7fpyksd1339f0m26dlw2famxwyzgvm0a80k"))))
356 (build-system haskell-build-system)
357 (inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
359 "https://github.com/bos/quickcheck-unicode")
360 (synopsis "Generator functions Unicode-related tests")
361 (description "This package provides generator and shrink functions for
362 testing Unicode-related software.")
363 (license license:bsd-3)))
365 (define-public ghc-quickcheck-io
367 (name "ghc-quickcheck-io")
373 "https://hackage.haskell.org/package/quickcheck-io/quickcheck-io-"
378 "08k4v7pkgjf30pv5j2dfv1gqv6hclxlniyq2sps8zq4zswcr2xzv"))))
379 (build-system haskell-build-system)
381 `(("ghc-quickcheck" ,ghc-quickcheck)
382 ("ghc-hunit" ,ghc-hunit)))
384 "https://github.com/hspec/quickcheck-io#readme")
385 (synopsis "Use HUnit assertions as QuickCheck properties")
386 (description "This package provides an orphan instance that allows you to
387 use HUnit assertions as QuickCheck properties.")
388 (license license:expat)))
390 (define-public ghc-quickcheck
392 (name "ghc-quickcheck")
394 (outputs '("out" "doc"))
399 "https://hackage.haskell.org/package/QuickCheck/QuickCheck-"
404 "1ai6k5v0bibaxq8xffcblc6rwmmk6gf8vjyd9p2h3y6vwbhlvilq"))))
405 (build-system haskell-build-system)
407 `(#:tests? #f ; FIXME: currently missing libraries used for tests.
408 #:configure-flags '("-f base4")))
410 `(("ghc-tf-random" ,ghc-tf-random)))
412 "https://github.com/nick8325/quickcheck")
414 "Automatic testing of Haskell programs")
416 "QuickCheck is a library for random testing of program properties.")
417 (license license:bsd-3)))
419 (define-public ghc-test-framework
421 (name "ghc-test-framework")
426 (uri (string-append "https://hackage.haskell.org/package/test-framework/"
427 "test-framework-" version ".tar.gz"))
430 "0wxjgdvb1c4ykazw774zlx86550848wbsvgjgcrdzcgbb9m650vq"))))
431 (build-system haskell-build-system)
433 `(("ghc-hunit" ,ghc-hunit)
434 ("ghc-quickcheck" ,ghc-quickcheck)))
436 `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
437 ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
438 ("ghc-hostname" ,ghc-hostname)
439 ("ghc-old-locale" ,ghc-old-locale)
440 ("ghc-random" ,ghc-random)
441 ("ghc-regex-posix" ,ghc-regex-posix)
443 ("ghc-libxml" ,ghc-libxml)))
444 (home-page "https://batterseapower.github.io/test-framework/")
445 (synopsis "Framework for running and organising tests")
447 "This package allows tests such as QuickCheck properties and HUnit test
448 cases to be assembled into test groups, run in parallel (but reported in
449 deterministic order, to aid diff interpretation) and filtered and controlled
450 by command line options. All of this comes with colored test output, progress
451 reporting and test statistics output.")
452 (license license:bsd-3)))
454 (define-public ghc-test-framework-hunit
456 (name "ghc-test-framework-hunit")
461 (uri (string-append "https://hackage.haskell.org/package/"
462 "test-framework-hunit/test-framework-hunit-"
466 "1y0b6vg8nfm43v90lxxcydhi6qlxhfy4vpxbzm5ic2w55bh8xjwm"))))
467 (build-system haskell-build-system)
469 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
470 ("ghc-hunit" ,ghc-hunit)
471 ("ghc-test-framework" ,ghc-test-framework)))
472 (home-page "https://batterseapower.github.io/test-framework/")
473 (synopsis "HUnit support for test-framework")
475 "This package provides HUnit support for the test-framework package.")
476 (license license:bsd-3)))
478 (define-public ghc-test-framework-quickcheck2
480 (name "ghc-test-framework-quickcheck2")
485 (uri (string-append "https://hackage.haskell.org/package/"
486 "test-framework-quickcheck2/"
487 "test-framework-quickcheck2-" version ".tar.gz"))
490 "12p1zwrsz35r3j5gzbvixz9z1h5643rhihf5gqznmc991krwd5nc"))
491 (modules '((guix build utils)))
493 ;; The Hackage page and the cabal file linked there for this package
494 ;; both list 2.9 as the upper version limit, but the source tarball
495 ;; specifies 2.8. Assume the Hackage page is correct.
496 '(substitute* "test-framework-quickcheck2.cabal"
497 (("QuickCheck >= 2.4 && < 2.8") "QuickCheck >= 2.4 && < 2.9")))))
498 (build-system haskell-build-system)
500 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
501 ("ghc-quickcheck" ,ghc-quickcheck)
502 ("ghc-random" ,ghc-random)
503 ("ghc-test-framework" ,ghc-test-framework)))
504 (home-page "https://batterseapower.github.io/test-framework/")
505 (synopsis "QuickCheck2 support for test-framework")
507 "This packages provides QuickCheck2 support for the test-framework
509 (license license:bsd-3)))
511 (define-public ghc-test-framework-th
513 (name "ghc-test-framework-th")
518 (uri (string-append "https://hackage.haskell.org/package/"
519 "test-framework-th-" version "/"
520 "test-framework-th-" version ".tar.gz"))
523 "12lw7yj02jb9s0i7rb98jjam43j2h0gzmnbj9zi933fx7sg0sy4b"))))
524 (build-system haskell-build-system)
526 `(("ghc-test-framework" ,ghc-test-framework)
527 ("ghc-language-haskell-extract" ,ghc-language-haskell-extract)
528 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
529 ("ghc-regex-posix" ,ghc-regex-posix)))
530 (home-page "https://github.com/finnsson/test-generator")
531 (synopsis "Auto generate the HUnit- and Quickcheck-bulk-code
532 using Template Haskell")
533 (description "This library contains two functions:
534 @code{defaultMainGenerator} and @code{testGroupGenerator}.
536 @code{defaultMainGenerator} will extract all functions beginning with
537 @code{case_}, @code{prop_}, or @code{test_} in the module and put them in a
540 @code{testGroupGenerator} is like @code{defaultMainGenerator} but without
541 @code{defaultMain}. It is useful if you need a function for the testgroup
542 \(e.g. if you want to be able to call the testgroup from another module).")
543 (license license:bsd-3)))
545 (define-public ghc-hunit
549 (outputs '("out" "doc"))
554 "https://hackage.haskell.org/package/HUnit/HUnit-"
559 "0hcs6qh8bqhip1kkjjnw7ccgcsmawdz5yvffjj5y8zd2vcsavx8a"))))
560 (build-system haskell-build-system)
561 (home-page "http://hunit.sourceforge.net/")
562 (synopsis "Unit testing framework for Haskell")
564 "HUnit is a unit testing framework for Haskell, inspired by the
565 JUnit tool for Java.")
566 (license license:bsd-3)))
568 (define-public hspec-discover
570 (name "hspec-discover")
576 "https://hackage.haskell.org/package/hspec-discover/hspec-discover-"
581 "0w3awzbljf4hqhxrjrxqa1lfcclg92bhmq641gz2q80vycspapzx"))))
582 (build-system haskell-build-system)
583 (arguments `(#:haddock? #f)) ; Haddock phase fails because there are no
584 ; documentation files.
585 (inputs `(("ghc-hspec-meta" ,ghc-hspec-meta)))
586 (home-page "http://hspec.github.io/")
587 (synopsis "Automatically discover and run Hspec tests")
588 (description "hspec-discover is a tool which automatically discovers and
590 (license license:expat)))
592 (define-public ghc-hspec-core
594 (name "ghc-hspec-core")
600 "https://hackage.haskell.org/package/hspec-core/hspec-core-"
605 "1wgd55k652jaf81nkvciyqi67ycj7zamr4nd9z1cqf8nr9fc3sa4"))))
606 (build-system haskell-build-system)
607 (arguments `(#:tests? #f)) ; FIXME: testing libraries are missing.
609 `(("ghc-setenv" ,ghc-setenv)
610 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
611 ("ghc-async" ,ghc-async)
612 ("ghc-quickcheck-io" ,ghc-quickcheck-io)
613 ("ghc-hunit" ,ghc-hunit)
614 ("ghc-quickcheck" ,ghc-quickcheck)
615 ("ghc-hspec-expectations" ,ghc-hspec-expectations)
616 ("ghc-silently" ,ghc-silently)))
617 (home-page "http://hspec.github.io/")
618 (synopsis "Testing framework for Haskell")
619 (description "This library exposes internal types and functions that can
620 be used to extend Hspec's functionality.")
621 (license license:expat)))
623 (define-public ghc-hspec-meta
625 (name "ghc-hspec-meta")
631 "https://hackage.haskell.org/package/hspec-meta/hspec-meta-"
636 "1fmqmgrzp135cxhmxxbaswkk4bqbpgfml00cmcz0d39n11vzpa5z"))))
637 (build-system haskell-build-system)
639 `(("ghc-quickcheck" ,ghc-quickcheck)
640 ("ghc-hunit" ,ghc-hunit)
641 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
642 ("ghc-async" ,ghc-async)
643 ("ghc-hspec-expectations" ,ghc-hspec-expectations)
644 ("ghc-setenv" ,ghc-setenv)
645 ("ghc-random" ,ghc-random)
646 ("ghc-quickcheck-io" ,ghc-quickcheck-io)))
647 (home-page "http://hspec.github.io/")
648 (synopsis "Version of Hspec to test Hspec itself")
649 (description "This library provides a stable version of Hspec which is
650 used to test the in-development version of Hspec.")
651 (license license:expat)))
653 (define-public ghc-hspec
661 "https://hackage.haskell.org/package/hspec/hspec-"
666 "0zqisxznlbszivsgy3irvf566zhcr6ipqqj3x9i7pj5hy913jwqf"))))
667 (build-system haskell-build-system)
669 `(("ghc-hspec-core" ,ghc-hspec-core)
670 ("hspec-discover" ,hspec-discover)
671 ("ghc-hspec-expectations" ,ghc-hspec-expectations)
672 ("ghc-quickcheck" ,ghc-quickcheck)
673 ("ghc-hunit" ,ghc-hunit)
674 ("ghc-stringbuilder" ,ghc-stringbuilder)
675 ("ghc-hspec-meta" ,ghc-hspec-meta)))
676 (home-page "http://hspec.github.io/")
677 (synopsis "Testing Framework for Haskell")
678 (description "This library provides the Hspec testing framework for
679 Haskell, inspired by the Ruby library RSpec.")
680 (license license:expat)))
682 (define-public ghc-hspec-contrib
684 (name "ghc-hspec-contrib")
688 (uri (string-append "https://hackage.haskell.org/package/"
689 "hspec-contrib/hspec-contrib-"
693 "006syw8xagfhsx06ws9ywig1qx5lk4cgl7sq6pbid1s64c72mxn4"))))
694 (build-system haskell-build-system)
696 `(("ghc-hspec-core" ,ghc-hspec-core)
697 ("ghc-hunit" ,ghc-hunit)
698 ("ghc-hspec" ,ghc-hspec)
699 ("ghc-quickcheck" ,ghc-quickcheck)))
701 `(("hspec-discover" ,hspec-discover)))
702 (home-page "http://hspec.github.io/")
703 (synopsis "Contributed functionality for Hspec")
705 "This package provides contributed Hspec extensions.")
706 (license license:expat)))
708 (define-public ghc-hspec-expectations
710 (name "ghc-hspec-expectations")
716 "https://hackage.haskell.org/package/hspec-expectations/hspec-expectations-"
721 "1w56jiqfyl237sr207gh3b0l8sr9layy0mdsgd5wknzb49mif6ip"))))
722 (build-system haskell-build-system)
723 (inputs `(("ghc-hunit" ,ghc-hunit)))
724 (home-page "https://github.com/sol/hspec-expectations")
725 (synopsis "Catchy combinators for HUnit")
726 (description "This library provides catchy combinators for HUnit, see
727 @uref{https://github.com/sol/hspec-expectations#readme, the README}.")
728 (license license:expat)))