[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28884] [PATCH 08/38] gnu: Add ghc-test-framework-th.
From: |
Ludovic Courtès |
Subject: |
[bug#28884] [PATCH 08/38] gnu: Add ghc-test-framework-th. |
Date: |
Sun, 22 Oct 2017 14:56:24 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
rsiddharth <address@hidden> skribis:
> * gnu/packages/haskell.scm (ghc-test-framework-th): New variable.
Applied after removing the example from the description (see below).
Thanks,
Ludo’.
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index efcad87c8..298d856ab 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -9225,49 +9225,8 @@ using Template Haskell")
@code{defaultMainGenerator} and @code{testGroupGenerator}.
@code{defaultMainGenerator} will extract all functions beginning with
-case_, prop_ or test_in the module and put them in a testGroup.
-
address@hidden
- -- file SomeModule.hs
- \( -# LANGUAGE TemplateHaskell #- )
- module SomeModule where
- import Test.Framework.TH
- import Test.Framework
- import Test.HUnit
- import Test.Framework.Providers.HUnit
- import Test.Framework.Providers.QuickCheck2
-
- -- observe this line!
- main = $\(defaultMainGenerator)
- case_1 = do 1 @=? 1
- case_2 = do 2 @=? 2
- prop_reverse xs = reverse \(reverse xs) == xs
- where types = xs::[Int]
address@hidden verbatim
-
- is the same as
-
address@hidden
- -- file SomeModule.hs
- \( -# LANGUAGE TemplateHaskell #- )
- module SomeModule where
- import Test.Framework.TH
- import Test.Framework
- import Test.HUnit
- import Test.Framework.Providers.HUnit
- import Test.Framework.Providers.QuickCheck2
-
- -- observe this line!
- main =
- defaultMain [
- testGroup \"SomeModule\" [ testCase \"1\" case_1, testCase \"2\" \
-case_2, testProperty \"reverse\" prop_reverse]
- ]
- case_1 = do 1 @=? 1
- case_2 = do 2 @=? 2
- prop_reverse xs = reverse \(reverse xs) == xs
- where types = xs::[Int]
address@hidden verbatim
address@hidden, @code{prop_}, or @code{test_} in the module and put them in a
address@hidden
@code{testGroupGenerator} is like @code{defaultMainGenerator} but without
@code{defaultMain}. It is useful if you need a function for the testgroup
- [bug#28884] [PATCH 01/38] gnu: Add ghc-errors., (continued)
- [bug#28884] [PATCH 01/38] gnu: Add ghc-errors., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 04/38] gnu: Add ghc-math-functions., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 03/38] gnu: Add ghc-erf., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 02/38] gnu: Add ghc-vector-th-unbox., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 09/38] gnu: Add ghc-abstract-par., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 07/38] gnu: Add ghc-language-haskell-extract., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 05/38] gnu: Add ghc-mwc-random., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 06/38] gnu: Add ghc-vector-algorithms., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 08/38] gnu: Add ghc-test-framework-th., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 08/38] gnu: Add ghc-test-framework-th.,
Ludovic Courtès <=
- [bug#28884] [PATCH 11/38] gnu: Add ghc-abstract-deque., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 12/38] gnu: Add ghc-monad-par., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 10/38] gnu: Add ghc-monad-par-extras., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 13/38] gnu: ghc-base-orphans: Update to 0.6., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 15/38] gnu: Add ghc-chunked-data., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 14/38] gnu: Add ghc-statistics., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 21/38] gnu: Add ghc-entropy., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 19/38] gnu: Add ghc-monadrandom., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 17/38] gnu: Add ghc-tuple-th., rsiddharth, 2017/10/17
- [bug#28884] [PATCH 18/38] gnu: Add ghc-contravariant-extras., rsiddharth, 2017/10/17