GNU bug report logs -
#28884
[PATCH 00/38] Add ghc-aws and its dependencies.
Previous Next
Reported by: rsiddharth <s <at> ricketyspace.net>
Date: Wed, 18 Oct 2017 03:04:01 UTC
Severity: normal
Tags: patch
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
Full log
Message #128 received at 28884 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
rsiddharth <s <at> ricketyspace.net> skribis:
> * gnu/packages/haskell.scm (ghc-test-framework-th): New variable.
Applied after removing the example from the description (see below).
Thanks,
Ludo’.
[Message part 2 (text/x-patch, inline)]
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.
-
-@verbatim
- -- 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]
-@end verbatim
-
- is the same as
-
-@verbatim
- -- 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]
-@end verbatim
+@code{case_}, @code{prop_}, or @code{test_} in the module and put them in a
+@code{testGroup}.
@code{testGroupGenerator} is like @code{defaultMainGenerator} but without
@code{defaultMain}. It is useful if you need a function for the testgroup
This bug report was last modified 7 years and 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.