Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 76e50fa6012c3b6dc2b719998ee68ba5 > files > 56

ghc-QuickCheck-devel-2.4.0.1-8.fc15.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Test.QuickCheck.Property</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Test-QuickCheck-Property.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Test-QuickCheck-Property.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">QuickCheck-2.4.0.1: Automatic testing of Haskell programs</p></div><div id="content"><div id="module-header"><p class="caption">Test.QuickCheck.Property</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Property and Testable types
</a><ul><li><a href="#g:2">Exception handling
</a></li><li><a href="#g:3">Type Prop
</a></li><li><a href="#g:4">type Rose
</a></li><li><a href="#g:5">Result type
</a></li><li><a href="#g:6">Lifting and mapping functions
</a></li><li><a href="#g:7">Property combinators
</a></li></ul></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Property">Property</a> = <a href="Test-QuickCheck-Gen.html#t:Gen">Gen</a> <a href="Test-QuickCheck-Property.html#t:Prop">Prop</a></li><li class="src short"><span class="keyword">class</span>  <a href="#t:Testable">Testable</a> prop  <span class="keyword">where</span><ul class="subs"><li><a href="#v:property">property</a> :: prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li></ul></li><li class="src short"><a href="#v:morallyDubiousIOProperty">morallyDubiousIOProperty</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:protect">protect</a> ::  (AnException -&gt; a) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><span class="keyword">newtype</span>  <a href="#t:Prop">Prop</a>  = <a href="#v:MkProp">MkProp</a> {<ul class="subs"><li><a href="#v:unProp">unProp</a> :: <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li></ul>}</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Rose">Rose</a> a<ul class="subs"><li>= <a href="#v:MkRose">MkRose</a> a [<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a]  </li><li>| <a href="#v:IORose">IORose</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a))  </li></ul></li><li class="src short"><a href="#v:ioRose">ioRose</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li><li class="src short"><a href="#v:joinRose">joinRose</a> ::  <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a) -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a</li><li class="src short"><a href="#v:reduceRose">reduceRose</a> :: <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>)</li><li class="src short"><a href="#v:onRose">onRose</a> ::  (a -&gt; [<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a] -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a) -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a</li><li class="src short"><a href="#v:protectRose">protectRose</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>)</li><li class="src short"><a href="#v:protectResults">protectResults</a> :: <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Callback">Callback</a> <ul class="subs"><li>= <a href="#v:PostTest">PostTest</a> <a href="Test-QuickCheck-Property.html#t:CallbackKind">CallbackKind</a> (<a href="Test-QuickCheck-State.html#t:State">State</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)  </li><li>| <a href="#v:PostFinalFailure">PostFinalFailure</a> <a href="Test-QuickCheck-Property.html#t:CallbackKind">CallbackKind</a> (<a href="Test-QuickCheck-State.html#t:State">State</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:CallbackKind">CallbackKind</a> <ul class="subs"><li>= <a href="#v:Counterexample">Counterexample</a>  </li><li>| <a href="#v:NotCounterexample">NotCounterexample</a>  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Result">Result</a>  = <a href="#v:MkResult">MkResult</a> {<ul class="subs"><li><a href="#v:ok">ok</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:expect">expect</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:reason">reason</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li><a href="#v:interrupted">interrupted</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:stamp">stamp</a> :: [(<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>)]</li><li><a href="#v:callbacks">callbacks</a> :: [<a href="Test-QuickCheck-Property.html#t:Callback">Callback</a>]</li></ul>}</li><li class="src short"><a href="#v:result">result</a> :: <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li><li class="src short"><a href="#v:exception">exception</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; AnException -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li><li class="src short"><a href="#v:protectResult">protectResult</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li><li class="src short"><a href="#v:succeeded">succeeded</a> :: <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li><li class="src short"><a href="#v:failed">failed</a> :: <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li><li class="src short"><a href="#v:rejected">rejected</a> :: <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li><li class="src short"><a href="#v:liftBool">liftBool</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a></li><li class="src short"><a href="#v:mapResult">mapResult</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:mapTotalResult">mapTotalResult</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:mapRoseResult">mapRoseResult</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:mapProp">mapProp</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="Test-QuickCheck-Property.html#t:Prop">Prop</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Prop">Prop</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:mapSize">mapSize</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:shrinking">shrinking</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (a -&gt; [a]) -&gt; a -&gt; (a -&gt; prop) -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:noShrinking">noShrinking</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:callback">callback</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="Test-QuickCheck-Property.html#t:Callback">Callback</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:printTestCase">printTestCase</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:whenFail">whenFail</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:whenFail-39-">whenFail'</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:verbose">verbose</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:expectFailure">expectFailure</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:label">label</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:collect">collect</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> a, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop) =&gt; a -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:classify">classify</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:cover">cover</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:-61--61--62-">(==&gt;)</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:within">within</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:forAll">forAll</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> a, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop) =&gt; <a href="Test-QuickCheck-Gen.html#t:Gen">Gen</a> a -&gt; (a -&gt; prop) -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:forAllShrink">forAllShrink</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> a, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop) =&gt; <a href="Test-QuickCheck-Gen.html#t:Gen">Gen</a> a -&gt; (a -&gt; [a]) -&gt; (a -&gt; prop) -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:.-38-.">(.&amp;.)</a> :: (<a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop1, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop2) =&gt; prop1 -&gt; prop2 -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:.-38--38-.">(.&amp;&amp;.)</a> :: (<a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop1, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop2) =&gt; prop1 -&gt; prop2 -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:conjoin">conjoin</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; [prop] -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:.-124--124-.">(.||.)</a> :: (<a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop1, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop2) =&gt; prop1 -&gt; prop2 -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:disjoin">disjoin</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; [prop] -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></li></ul></div><div id="interface"><h1 id="g:1">Property and Testable types
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Property" class="def">Property</a> = <a href="Test-QuickCheck-Gen.html#t:Gen">Gen</a> <a href="Test-QuickCheck-Property.html#t:Prop">Prop</a><a href="src/Test-QuickCheck-Property.html#Property" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Testable" class="def">Testable</a> prop  <span class="keyword">where</span><a href="src/Test-QuickCheck-Property.html#Testable" class="link">Source</a></p><div class="doc"><p>The class of things which can be tested, i.e. turned into a property.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:property" class="def">property</a> :: prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#property" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Testable" class="caption collapser" onclick="toggleSection('i:Testable')">Instances</p><div id="section.i:Testable" class="show"><table><tr><td class="src"><a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> <a href="Test-QuickCheck-Property.html#t:Prop">Prop</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> (<a href="Test-QuickCheck-Gen.html#t:Gen">Gen</a> prop)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Test-QuickCheck-Arbitrary.html#t:Arbitrary">Arbitrary</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> a, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop) =&gt; <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> (a -&gt; prop)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:morallyDubiousIOProperty" class="def">morallyDubiousIOProperty</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#morallyDubiousIOProperty" class="link">Source</a></p><div class="doc"><p>Do I/O inside a property. This can obviously lead to unrepeatable
 testcases, so use with care.
</p></div></div><h2 id="g:2">Exception handling
</h2><div class="top"><p class="src"><a name="v:protect" class="def">protect</a> ::  (AnException -&gt; a) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a<a href="src/Test-QuickCheck-Property.html#protect" class="link">Source</a></p></div><h2 id="g:3">Type Prop
</h2><div class="top"><p class="src"><span class="keyword">newtype</span>  <a name="t:Prop" class="def">Prop</a>  <a href="src/Test-QuickCheck-Property.html#Prop" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:MkProp" class="def">MkProp</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:unProp" class="def">unProp</a> :: <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Prop" class="caption collapser" onclick="toggleSection('i:Prop')">Instances</p><div id="section.i:Prop" class="show"><table><tr><td class="src"><a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> <a href="Test-QuickCheck-Property.html#t:Prop">Prop</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:4">type Rose
</h2><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Rose" class="def">Rose</a> a <a href="src/Test-QuickCheck-Property.html#Rose" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:MkRose" class="def">MkRose</a> a [<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:IORose" class="def">IORose</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a))</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Rose" class="caption collapser" onclick="toggleSection('i:Rose')">Instances</p><div id="section.i:Rose" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:ioRose" class="def">ioRose</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a><a href="src/Test-QuickCheck-Property.html#ioRose" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:joinRose" class="def">joinRose</a> ::  <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a) -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a<a href="src/Test-QuickCheck-Property.html#joinRose" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:reduceRose" class="def">reduceRose</a> :: <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>)<a href="src/Test-QuickCheck-Property.html#reduceRose" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:onRose" class="def">onRose</a> ::  (a -&gt; [<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a] -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a) -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> a<a href="src/Test-QuickCheck-Property.html#onRose" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:protectRose" class="def">protectRose</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>)<a href="src/Test-QuickCheck-Property.html#protectRose" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:protectResults" class="def">protectResults</a> :: <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a><a href="src/Test-QuickCheck-Property.html#protectResults" class="link">Source</a></p></div><h2 id="g:5">Result type
</h2><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Callback" class="def">Callback</a>  <a href="src/Test-QuickCheck-Property.html#Callback" class="link">Source</a></p><div class="doc"><p>Different kinds of callbacks
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PostTest" class="def">PostTest</a> <a href="Test-QuickCheck-Property.html#t:CallbackKind">CallbackKind</a> (<a href="Test-QuickCheck-State.html#t:State">State</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</td><td class="doc"><p>Called just after a test
</p></td></tr><tr><td class="src"><a name="v:PostFinalFailure" class="def">PostFinalFailure</a> <a href="Test-QuickCheck-Property.html#t:CallbackKind">CallbackKind</a> (<a href="Test-QuickCheck-State.html#t:State">State</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</td><td class="doc"><p>Called with the final failing test-case
</p></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:CallbackKind" class="def">CallbackKind</a>  <a href="src/Test-QuickCheck-Property.html#CallbackKind" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Counterexample" class="def">Counterexample</a></td><td class="doc"><p>Affected by the <code><a href="Test-QuickCheck-Property.html#v:verbose">verbose</a></code> combinator
</p></td></tr><tr><td class="src"><a name="v:NotCounterexample" class="def">NotCounterexample</a></td><td class="doc"><p>Not affected by the <code><a href="Test-QuickCheck-Property.html#v:verbose">verbose</a></code> combinator
</p></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Result" class="def">Result</a>  <a href="src/Test-QuickCheck-Property.html#Result" class="link">Source</a></p><div class="doc"><p>The result of a single test.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:MkResult" class="def">MkResult</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:ok" class="def">ok</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>result of the test case; Nothing = discard
</p></dd><dt class="src"><a name="v:expect" class="def">expect</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>indicates what the expected result of the property is
</p></dd><dt class="src"><a name="v:reason" class="def">reason</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></dt><dd class="doc"><p>a message indicating what went wrong
</p></dd><dt class="src"><a name="v:interrupted" class="def">interrupted</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>indicates if the test case was cancelled by pressing ^C
</p></dd><dt class="src"><a name="v:stamp" class="def">stamp</a> :: [(<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>)]</dt><dd class="doc"><p>the collected values for this test case
</p></dd><dt class="src"><a name="v:callbacks" class="def">callbacks</a> :: [<a href="Test-QuickCheck-Property.html#t:Callback">Callback</a>]</dt><dd class="doc"><p>the callbacks for this test case
</p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Result" class="caption collapser" onclick="toggleSection('i:Result')">Instances</p><div id="section.i:Result" class="show"><table><tr><td class="src"><a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:result" class="def">result</a> :: <a href="Test-QuickCheck-Property.html#t:Result">Result</a><a href="src/Test-QuickCheck-Property.html#result" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:exception" class="def">exception</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; AnException -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a><a href="src/Test-QuickCheck-Property.html#exception" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:protectResult" class="def">protectResult</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a><a href="src/Test-QuickCheck-Property.html#protectResult" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:succeeded" class="def">succeeded</a> :: <a href="Test-QuickCheck-Property.html#t:Result">Result</a><a href="src/Test-QuickCheck-Property.html#succeeded" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:failed" class="def">failed</a> :: <a href="Test-QuickCheck-Property.html#t:Result">Result</a><a href="src/Test-QuickCheck-Property.html#failed" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:rejected" class="def">rejected</a> :: <a href="Test-QuickCheck-Property.html#t:Result">Result</a><a href="src/Test-QuickCheck-Property.html#rejected" class="link">Source</a></p></div><h2 id="g:6">Lifting and mapping functions
</h2><div class="top"><p class="src"><a name="v:liftBool" class="def">liftBool</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a><a href="src/Test-QuickCheck-Property.html#liftBool" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mapResult" class="def">mapResult</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#mapResult" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mapTotalResult" class="def">mapTotalResult</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#mapTotalResult" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mapRoseResult" class="def">mapRoseResult</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Rose">Rose</a> <a href="Test-QuickCheck-Property.html#t:Result">Result</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#mapRoseResult" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mapProp" class="def">mapProp</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="Test-QuickCheck-Property.html#t:Prop">Prop</a> -&gt; <a href="Test-QuickCheck-Property.html#t:Prop">Prop</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#mapProp" class="link">Source</a></p></div><h2 id="g:7">Property combinators
</h2><div class="top"><p class="src"><a name="v:mapSize" class="def">mapSize</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>) -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#mapSize" class="link">Source</a></p><div class="doc"><p>Changes the maximum test case size for a property.
</p></div></div><div class="top"><p class="src"><a name="v:shrinking" class="def">shrinking</a><a href="src/Test-QuickCheck-Property.html#shrinking" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; (a -&gt; [a])</td><td class="doc"><p><code><a href="Test-QuickCheck-Arbitrary.html#v:shrink">shrink</a></code>-like function.
</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>The original argument
</p></td></tr><tr><td class="src">-&gt; (a -&gt; prop)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Shrinks the argument to property if it fails. Shrinking is done
 automatically for most types. This is only needed when you want to
 override the default behavior.
</p></div></div><div class="top"><p class="src"><a name="v:noShrinking" class="def">noShrinking</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#noShrinking" class="link">Source</a></p><div class="doc"><p>Disables shrinking for a property altogether.
</p></div></div><div class="top"><p class="src"><a name="v:callback" class="def">callback</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="Test-QuickCheck-Property.html#t:Callback">Callback</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#callback" class="link">Source</a></p><div class="doc"><p>Adds a callback
</p></div></div><div class="top"><p class="src"><a name="v:printTestCase" class="def">printTestCase</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#printTestCase" class="link">Source</a></p><div class="doc"><p>Prints a message to the terminal as part of the counterexample.
</p></div></div><div class="top"><p class="src"><a name="v:whenFail" class="def">whenFail</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#whenFail" class="link">Source</a></p><div class="doc"><p>Performs an <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a></code> action after the last failure of a property.
</p></div></div><div class="top"><p class="src"><a name="v:whenFail-39-" class="def">whenFail'</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#whenFail%27" class="link">Source</a></p><div class="doc"><p>Performs an <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a></code> action every time a property fails. Thus,
 if shrinking is done, this can be used to keep track of the 
 failures along the way.
</p></div></div><div class="top"><p class="src"><a name="v:verbose" class="def">verbose</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#verbose" class="link">Source</a></p><div class="doc"><p>Prints out the generated testcase every time the property is tested,
 like <code>verboseCheck</code> from QuickCheck 1.
 Only variables quantified over <em>inside</em> the <code><a href="Test-QuickCheck-Property.html#v:verbose">verbose</a></code> are printed.
</p></div></div><div class="top"><p class="src"><a name="v:expectFailure" class="def">expectFailure</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#expectFailure" class="link">Source</a></p><div class="doc"><p>Modifies a property so that it is expected to fail for some test cases.
</p></div></div><div class="top"><p class="src"><a name="v:label" class="def">label</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#label" class="link">Source</a></p><div class="doc"><p>Attaches a label to a property. This is used for reporting
 test case distribution.
</p></div></div><div class="top"><p class="src"><a name="v:collect" class="def">collect</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> a, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop) =&gt; a -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#collect" class="link">Source</a></p><div class="doc"><p>Labels a property with a value:
</p><pre> collect x = label (show x)
</pre></div></div><div class="top"><p class="src"><a name="v:classify" class="def">classify</a><a href="src/Test-QuickCheck-Property.html#classify" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p><code>True</code> if the test case should be labelled.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc"><p>Label.
</p></td></tr><tr><td class="src">-&gt; prop</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Conditionally labels test case.
</p></div></div><div class="top"><p class="src"><a name="v:cover" class="def">cover</a><a href="src/Test-QuickCheck-Property.html#cover" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p><code>True</code> if the test case belongs to the class.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>The required percentage (0-100) of test cases.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc"><p>Label for the test case class.
</p></td></tr><tr><td class="src">-&gt; prop</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Checks that at least the given proportion of the test cases belong
 to the given class.
</p></div></div><div class="top"><p class="src"><a name="v:-61--61--62-" class="def">(==&gt;)</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#%3D%3D%3E" class="link">Source</a></p><div class="doc"><p>Implication for properties: The resulting property holds if
 the first argument is <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#v:False">False</a></code>, or if the given property holds.
</p></div></div><div class="top"><p class="src"><a name="v:within" class="def">within</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; prop -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#within" class="link">Source</a></p><div class="doc"><p>Considers a property failed if it does not complete within
 the given number of microseconds.
</p></div></div><div class="top"><p class="src"><a name="v:forAll" class="def">forAll</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> a, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop) =&gt; <a href="Test-QuickCheck-Gen.html#t:Gen">Gen</a> a -&gt; (a -&gt; prop) -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#forAll" class="link">Source</a></p><div class="doc"><p>Explicit universal quantification: uses an explicitly given
 test case generator.
</p></div></div><div class="top"><p class="src"><a name="v:forAllShrink" class="def">forAllShrink</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> a, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop) =&gt; <a href="Test-QuickCheck-Gen.html#t:Gen">Gen</a> a -&gt; (a -&gt; [a]) -&gt; (a -&gt; prop) -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#forAllShrink" class="link">Source</a></p><div class="doc"><p>Like <code><a href="Test-QuickCheck-Property.html#v:forAll">forAll</a></code>, but tries to shrink the argument for failing test cases.
</p></div></div><div class="top"><p class="src"><a name="v:.-38-." class="def">(.&amp;.)</a> :: (<a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop1, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop2) =&gt; prop1 -&gt; prop2 -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#.%26." class="link">Source</a></p><div class="doc"><p>Nondeterministic choice: <code>p1</code> <code><a href="Test-QuickCheck-Property.html#v:.-38-.">.&amp;.</a></code> <code>p2</code> picks randomly one of
 <code>p1</code> and <code>p2</code> to test. If you test the property 100 times it
 makes 100 random choices.
</p></div></div><div class="top"><p class="src"><a name="v:.-38--38-." class="def">(.&amp;&amp;.)</a> :: (<a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop1, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop2) =&gt; prop1 -&gt; prop2 -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#.%26%26." class="link">Source</a></p><div class="doc"><p>Conjunction: <code>p1</code> <code><a href="Test-QuickCheck-Property.html#v:.-38--38-.">.&amp;&amp;.</a></code> <code>p2</code> passes if both <code>p1</code> and <code>p2</code> pass.
</p></div></div><div class="top"><p class="src"><a name="v:conjoin" class="def">conjoin</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; [prop] -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#conjoin" class="link">Source</a></p><div class="doc"><p>Take the conjunction of several properties.
</p></div></div><div class="top"><p class="src"><a name="v:.-124--124-." class="def">(.||.)</a> :: (<a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop1, <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop2) =&gt; prop1 -&gt; prop2 -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#.%7C%7C." class="link">Source</a></p><div class="doc"><p>Disjunction: <code>p1</code> <code><a href="Test-QuickCheck-Property.html#v:.-124--124-.">.||.</a></code> <code>p2</code> passes unless <code>p1</code> and <code>p2</code> simultaneously fail.
</p></div></div><div class="top"><p class="src"><a name="v:disjoin" class="def">disjoin</a> :: <a href="Test-QuickCheck-Property.html#t:Testable">Testable</a> prop =&gt; [prop] -&gt; <a href="Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Test-QuickCheck-Property.html#disjoin" class="link">Source</a></p><div class="doc"><p>Take the disjunction of several properties.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>