smallcheck-1.1.2: A property-based testing library

Copyright(c) Colin Runciman et al.
MaintainerRoman Cheplyaka <>
Safe HaskellSafe



You should only need this module if you wish to create your own way to run SmallCheck tests



smallCheck :: Testable IO a => Depth -> a -> IO () #

A simple driver that runs the test in the IO monad and prints the results.

smallCheckM :: Testable m a => Depth -> a -> m (Maybe PropertyFailure) #

Use this if:

  • You need to run a test in a monad different from IO
  • You need to analyse the results rather than just print them

smallCheckWithHook :: Testable m a => Depth -> (TestQuality -> m ()) -> a -> m (Maybe PropertyFailure) #

Like smallCheckM, but allows to specify a monadic hook that gets executed after each test is run.

Useful for applications that want to report progress information to the user.

test :: Testable m a => a -> Property m #

type Reason = String #

An explanation for the test outcome