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