Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 1f2b142b9d2ef4849a6f5316fa1c5b12 > files > 1287

ghc-6.10.4-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Test.QuickCheck.Batch</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Test-QuickCheck-Batch.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>QuickCheck-1.2.0.0: Automatic testing of Haskell programs</TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Test.QuickCheck.Batch</FONT
></TD
><TD ALIGN="right"
><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="infohead"
>Portability</TD
><TD CLASS="infoval"
>non-portable (uses Control.Exception, Control.Concurrent)</TD
></TR
><TR
><TD CLASS="infohead"
>Stability</TD
><TD CLASS="infoval"
>experimental</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>libraries@haskell.org</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
><P
>A batch driver for running QuickCheck.
</P
><P
><EM
>Note:</EM
> in GHC only, it is possible to place a time limit on each test,
 to ensure that testing terminates.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="#v%3Arun"
>run</A
> :: <A HREF="Test-QuickCheck.html#t%3ATestable"
>Testable</A
> a =&gt; a -&gt; <A HREF="Test-QuickCheck-Batch.html#t%3ATestOptions"
>TestOptions</A
> -&gt; <A HREF="../base/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Test-QuickCheck-Batch.html#t%3ATestResult"
>TestResult</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ArunTests"
>runTests</A
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Test-QuickCheck-Batch.html#t%3ATestOptions"
>TestOptions</A
> -&gt; [<A HREF="Test-QuickCheck-Batch.html#t%3ATestOptions"
>TestOptions</A
> -&gt; <A HREF="../base/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Test-QuickCheck-Batch.html#t%3ATestResult"
>TestResult</A
>] -&gt; <A HREF="../base/System-IO.html#t%3AIO"
>IO</A
> <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AdefOpt"
>defOpt</A
> :: <A HREF="Test-QuickCheck-Batch.html#t%3ATestOptions"
>TestOptions</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3ATestOptions"
>TestOptions</A
>  = <A HREF="#v%3ATestOptions"
>TestOptions</A
> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="recfield"
><A HREF="#v%3Ano_of_tests"
>no_of_tests</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Alength_of_tests"
>length_of_tests</A
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3Adebug_tests"
>debug_tests</A
> :: <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
></TABLE
>}</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3ATestResult"
>TestResult</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3ATestOk"
>TestOk</A
> <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> [[<A HREF="../base/Data-Char.html#t%3AString"
>String</A
>]]</TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ATestExausted"
>TestExausted</A
> <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> [[<A HREF="../base/Data-Char.html#t%3AString"
>String</A
>]]</TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ATestFailed"
>TestFailed</A
> [<A HREF="../base/Data-Char.html#t%3AString"
>String</A
>] <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ATestAborted"
>TestAborted</A
> <A HREF="../base/Control-OldException.html#t%3AException"
>Exception</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisBottom"
>isBottom</A
> ::  a -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Abottom"
>bottom</A
> ::  a</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:run"
><A NAME="v%3Arun"
></A
></A
><B
>run</B
> :: <A HREF="Test-QuickCheck.html#t%3ATestable"
>Testable</A
> a =&gt; a -&gt; <A HREF="Test-QuickCheck-Batch.html#t%3ATestOptions"
>TestOptions</A
> -&gt; <A HREF="../base/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Test-QuickCheck-Batch.html#t%3ATestResult"
>TestResult</A
></TD
></TR
><TR
><TD CLASS="doc"
>Run the test.
 Here we use the same random number each time,
 so we get reproducable results!
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:runTests"
><A NAME="v%3ArunTests"
></A
></A
><B
>runTests</B
> :: <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Test-QuickCheck-Batch.html#t%3ATestOptions"
>TestOptions</A
> -&gt; [<A HREF="Test-QuickCheck-Batch.html#t%3ATestOptions"
>TestOptions</A
> -&gt; <A HREF="../base/System-IO.html#t%3AIO"
>IO</A
> <A HREF="Test-QuickCheck-Batch.html#t%3ATestResult"
>TestResult</A
>] -&gt; <A HREF="../base/System-IO.html#t%3AIO"
>IO</A
> <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="doc"
>Prints a one line summary of various tests with common theme
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:defOpt"
><A NAME="v%3AdefOpt"
></A
></A
><B
>defOpt</B
> :: <A HREF="Test-QuickCheck-Batch.html#t%3ATestOptions"
>TestOptions</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:TestOptions"
><A NAME="t%3ATestOptions"
></A
></A
><B
>TestOptions</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:TestOptions"
><A NAME="v%3ATestOptions"
></A
></A
><B
>TestOptions</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="body" COLSPAN="2"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:no_of_tests"
><A NAME="v%3Ano_of_tests"
></A
></A
><B
>no_of_tests</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
><TD CLASS="rdoc"
>number of tests to run.
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:length_of_tests"
><A NAME="v%3Alength_of_tests"
></A
></A
><B
>length_of_tests</B
> :: <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
><TD CLASS="rdoc"
>time limit for test, in seconds.
 If zero, no time limit.
 <EM
>Note:</EM
> only GHC supports time limits.
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:debug_tests"
><A NAME="v%3Adebug_tests"
></A
></A
><B
>debug_tests</B
> :: <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:TestResult"
><A NAME="t%3ATestResult"
></A
></A
><B
>TestResult</B
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:TestOk"
><A NAME="v%3ATestOk"
></A
></A
><B
>TestOk</B
> <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> [[<A HREF="../base/Data-Char.html#t%3AString"
>String</A
>]]</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:TestExausted"
><A NAME="v%3ATestExausted"
></A
></A
><B
>TestExausted</B
> <A HREF="../base/Data-Char.html#t%3AString"
>String</A
> <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
> [[<A HREF="../base/Data-Char.html#t%3AString"
>String</A
>]]</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:TestFailed"
><A NAME="v%3ATestFailed"
></A
></A
><B
>TestFailed</B
> [<A HREF="../base/Data-Char.html#t%3AString"
>String</A
>] <A HREF="../ghc-prim/GHC-Types.html#t%3AInt"
>Int</A
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:TestAborted"
><A NAME="v%3ATestAborted"
></A
></A
><B
>TestAborted</B
> <A HREF="../base/Control-OldException.html#t%3AException"
>Exception</A
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:isBottom"
><A NAME="v%3AisBottom"
></A
></A
><B
>isBottom</B
> ::  a -&gt; <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Look out behind you! These can be misused badly.
 However, in the context of a batch tester, can also be very useful.
</P
><P
>Examples of use of bottom and isBottom:
</P
><PRE
>	{- test for abort -}
	prop_head2 = isBottom (head [])
	{- test for strictness -}
	prop_head3 = isBottom (head bottom)
</PRE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:bottom"
><A NAME="v%3Abottom"
></A
></A
><B
>bottom</B
> ::  a</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.4.2</TD
></TR
></TABLE
></BODY
></HTML
>