-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | LeanCheck support for the Hspec test framework.
--   
--   LeanCheck support for the Hspec test framework.
--   
--   This package can be used to incorporate LeanCheck tests into Hspec
--   test suites by means of the <tt>Test.Hspec.LeanCheck.testProperty</tt>
--   function.
--   
--   Please see the Haddock documentation and README for more details.
@package hspec-leancheck
@version 0.0.3


-- | LeanCheck support for the Hspec test framework.
--   
--   Here's how your <tt>spec.hs</tt> might look like:
--   
--   <pre>
--   import Test.Hspec
--   import Test.Hspec.LeanCheck as LC
--   
--   import Data.List (sort)
--   
--   main :: IO ()
--   main = hspec spec
--   
--   spec :: Spec
--   spec = do
--     describe "sort" $ do
--       it "is idempotent" $
--         LC.property $ \xs -&gt; sort (sort xs :: [Int]) == sort xs
--       it "is identity" $ -- not really
--         LC.property $ \xs -&gt; sort (xs :: [Int]) == xs
--   </pre>
--   
--   The output for the above program is:
--   
--   <pre>
--   $ ./eg/minimal
--   
--   sort
--     is idempotent
--     is identity FAILED [1]
--   
--   Failures:
--   
--     eg/minimal.hs:17:5:
--     1) sort is identity
--          [1,0]
--   
--     To rerun use: --match "/sort/is identity/"
--   
--   2 examples, 1 failure
--   </pre>
--   
--   Please see the documentation of <a>Test.LeanCheck</a> and Hspec for
--   more details.
module Test.Hspec.LeanCheck

-- | Allows a LeanCheck <a>Testable</a> property to appear in a Spec. Like
--   so:
--   
--   <pre>
--   spec :: Spec
--   spec = do
--     describe "thing" $ do
--      it "is so and so" $ property $ \x... -&gt; ...
--      it "is like this" $ property $ \y... -&gt; ...
--      ...
--   </pre>
property :: Testable a => a -> Property

-- | Like <a>property</a> but allows setting the maximum number of tests.
--   
--   <pre>
--   spec :: Spec
--   spec = do
--     describe "thing" $ do
--      it "is so and so" $ propertyFor 100 $ \... -&gt; ...
--      it "is like this" $ propertyFor 200 $ \... -&gt; ...
--      it "does a thing" $ propertyFor 300 $ \... -&gt; ...
--      ...
--   </pre>
propertyFor :: Testable a => Int -> a -> Property

-- | Allows a named LeanCheck <a>Testable</a> property to appear in a Spec.
--   
--   <pre>
--   prop "does so and so" $ ...
--   </pre>
--   
--   is a shortcut for
--   
--   <pre>
--   it "does so an so" $ property $ ...
--   </pre>
--   
--   <pre>
--   spec :: Spec
--   spec = do
--     describe "thing" $ do
--      prop "is so and so" $ \x... -&gt; ...
--      prop "is like this" $ \y... -&gt; ...
--      ...
--   </pre>
prop :: Testable a => String -> a -> Spec

-- | A LeanCheck property. See <a>property</a>, <a>propertyFor</a> and
--   <a>prop</a>.
data Property
instance Test.Hspec.Core.Example.Example Test.Hspec.LeanCheck.Property
instance Test.LeanCheck.Core.Testable (GHC.Types.IO a)
