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

-- | Framework for running and organising tests, with HUnit and QuickCheck support
--   
--   Allows tests such as QuickCheck properties and HUnit test cases to be
--   assembled into test groups, run in parallel (but reported in
--   deterministic order, to aid diff interpretation) and filtered and
--   controlled by command line options. All of this comes with colored
--   test output, progress reporting and test statistics output.
@package test-framework
@version 0.8.2.2

module Test.Framework.Seed
data Seed
FixedSeed :: Int -> Seed
RandomSeed :: Seed

-- | Given a Seed, returns a new random number generator based on
--   that seed and the actual numeric seed that was used to build that
--   generator, so it can be recreated.
newSeededStdGen :: Seed -> IO (StdGen, Int)
newStdGenWithKnownSeed :: IO (StdGen, Int)
instance GHC.Internal.Read.Read Test.Framework.Seed.Seed
instance GHC.Internal.Show.Show Test.Framework.Seed.Seed

module Test.Framework.Runners.TestPattern
data TestPattern
parseTestPattern :: String -> TestPattern
testPatternMatches :: TestPattern -> [String] -> Bool
instance GHC.Classes.Eq Test.Framework.Runners.TestPattern.Token
instance GHC.Internal.Read.Read Test.Framework.Runners.TestPattern.TestPattern

module Test.Framework.Options
type TestOptions = TestOptions' Maybe
type CompleteTestOptions = TestOptions' K
data TestOptions' (f :: Type -> Type)
TestOptions :: f Seed -> f Int -> f Int -> f Int -> f Int -> f (Maybe Int) -> TestOptions' (f :: Type -> Type)

-- | Seed that should be used to create random numbers for generated tests
[topt_seed] :: TestOptions' (f :: Type -> Type) -> f Seed

-- | Maximum number of tests to generate when using something like
--   QuickCheck
[topt_maximum_generated_tests] :: TestOptions' (f :: Type -> Type) -> f Int

-- | Maximum number of unsuitable tests to consider before giving up when
--   using something like QuickCheck
[topt_maximum_unsuitable_generated_tests] :: TestOptions' (f :: Type -> Type) -> f Int

-- | Maximum size of generated tests when using something like QuickCheck
[topt_maximum_test_size] :: TestOptions' (f :: Type -> Type) -> f Int

-- | Maximum depth of generated tests when using something like SmallCheck
[topt_maximum_test_depth] :: TestOptions' (f :: Type -> Type) -> f Int

-- | The number of microseconds to run tests for before considering them a
--   failure
[topt_timeout] :: TestOptions' (f :: Type -> Type) -> f (Maybe Int)
instance GHC.Internal.Base.Monoid (Test.Framework.Options.TestOptions' GHC.Internal.Maybe.Maybe)
instance GHC.Internal.Base.Semigroup (Test.Framework.Options.TestOptions' GHC.Internal.Maybe.Maybe)

module Test.Framework.Runners.Options
data ColorMode
ColorAuto :: ColorMode
ColorNever :: ColorMode
ColorAlways :: ColorMode
type RunnerOptions = RunnerOptions' Maybe
data RunnerOptions' (f :: Type -> Type)
RunnerOptions :: f Int -> f TestOptions -> f [TestPattern] -> f (Maybe FilePath) -> f Bool -> f ColorMode -> f Bool -> f Bool -> RunnerOptions' (f :: Type -> Type)
[ropt_threads] :: RunnerOptions' (f :: Type -> Type) -> f Int
[ropt_test_options] :: RunnerOptions' (f :: Type -> Type) -> f TestOptions
[ropt_test_patterns] :: RunnerOptions' (f :: Type -> Type) -> f [TestPattern]
[ropt_xml_output] :: RunnerOptions' (f :: Type -> Type) -> f (Maybe FilePath)
[ropt_xml_nested] :: RunnerOptions' (f :: Type -> Type) -> f Bool
[ropt_color_mode] :: RunnerOptions' (f :: Type -> Type) -> f ColorMode
[ropt_hide_successes] :: RunnerOptions' (f :: Type -> Type) -> f Bool
[ropt_list_only] :: RunnerOptions' (f :: Type -> Type) -> f Bool
type CompleteRunnerOptions = RunnerOptions' K
data TestPattern
instance GHC.Internal.Base.Monoid (Test.Framework.Runners.Options.RunnerOptions' GHC.Internal.Maybe.Maybe)
instance GHC.Internal.Base.Semigroup (Test.Framework.Runners.Options.RunnerOptions' GHC.Internal.Maybe.Maybe)

-- | This module exports everything that you need to be able to create your
--   own test runner.
module Test.Framework.Runners.API

-- | TestRunner class simplifies folding a Test. You need to
--   specify the important semantic actions by instantiating this class,
--   and runTestTree will take care of recursion and test filtering.
class TestRunner b

-- | How to handle a single test
runSimpleTest :: (TestRunner b, Testlike i r t, Typeable t) => TestOptions -> TestName -> t -> b

-- | How to skip a test that doesn't satisfy the pattern
skipTest :: TestRunner b => b

-- | How to handle an IO test (created with buildTestBracketed)
runIOTest :: TestRunner b => IO (b, IO ()) -> b

-- | How to run a test group
runGroup :: TestRunner b => TestName -> [b] -> b

-- | Run the test tree using a TestRunner
runTestTree :: TestRunner b => TestOptions -> [TestPattern] -> Test -> b

module Test.Framework.Runners.Console
defaultMain :: [Test] -> IO ()

-- | A version of defaultMain that lets you ignore the command line
--   arguments in favour of another list of Strings.
defaultMainWithArgs :: [Test] -> [String] -> IO ()

-- | A version of defaultMain that lets you ignore the command line
--   arguments in favour of an explicit set of RunnerOptions.
defaultMainWithOpts :: [Test] -> RunnerOptions -> IO ()

-- | Nothing signifies that usage information should be displayed.
--   Just simply gives us the contribution to overall options by
--   the command line option.
type SuppliedRunnerOptions = Maybe RunnerOptions

-- | Options understood by test-framework. This can be used to add more
--   options to the tester executable.
optionsDescription :: [OptDescr SuppliedRunnerOptions]

-- | Parse the specified command line arguments into a RunnerOptions
--   and some remaining arguments, or return a reason as to why we can't.
interpretArgs :: [String] -> IO (Either String (RunnerOptions, [String]))

-- | A version of interpretArgs that ends the process if it fails.
interpretArgsOrExit :: [String] -> IO RunnerOptions

-- | This module exports everything that you need to be able to create your
--   own framework test provider. To create a provider you need to:
--   
--   
--   
- Create an instance of the Testlike class
--   
- Create an instance of the TestResultlike class
--   
- Expose a function that lets people construct Test values
--   using your new instances
--   
module Test.Framework.Providers.API

-- | Main test data type: builds up a list of tests to be run. Users should
--   use the utility functions in e.g. the test-framework-hunit and
--   test-framework-quickcheck2 packages to create instances of
--   Test, and then build them up into testsuites by using
--   testGroup and lists.
--   
--   For an example of how to use test-framework, please see
--   http://github.com/batterseapower/test-framework/raw/master/example/Test/Framework/Example.lhs
data Test

-- | A single test of some particular type
Test :: TestName -> t -> Test

-- | Assemble a number of tests into a cohesive group
TestGroup :: TestName -> [Test] -> Test

-- | Add some options to child tests
PlusTestOptions :: TestOptions -> Test -> Test

-- | Convenience for creating tests from an IO action, with cleanup
BuildTestBracketed :: IO (Test, IO ()) -> Test

-- | Test names or descriptions. These are shown to the user
type TestName = String

-- | Assemble a number of tests into a cohesive group
testGroup :: TestName -> [Test] -> Test

-- | Add some options to child tests
plusTestOptions :: TestOptions -> Test -> Test

-- | Convenience for creating tests from an IO action
buildTest :: IO Test -> Test

-- | Convenience for creating tests from an IO action, with a
--   cleanup handler for when tests are finished
buildTestBracketed :: IO (Test, IO ()) -> Test

-- | Mark all tests in this portion of the tree as mutually exclusive, so
--   only one runs at a time
mutuallyExclusive :: Test -> Test

-- | The name of a type of test, such as Properties or "Test Cases".
--   Tests of types of the same names will be grouped together in the test
--   run summary.
type TestTypeName = String

-- | Something like the result of a test: works in concert with
--   Testlike. The type parameters are the type that is used for
--   progress reports and the type of the final output of the test
--   respectively.
class (Show i, Show r) => TestResultlike i r | r -> i
testSucceeded :: TestResultlike i r => r -> Bool

-- | Something test-like in its behaviour. The type parameters are the type
--   that is used for progress reports, the type of the final output of the
--   test and the data type encapsulating the whole potential to do a test
--   respectively.
class TestResultlike i r => Testlike i r t | t -> i r, r -> i
runTest :: Testlike i r t => CompleteTestOptions -> t -> IO (i :~> r, IO ())
testTypeName :: Testlike i r t => t -> TestTypeName
data MutuallyExcluded t
ME :: MVar () -> t -> MutuallyExcluded t
liftIO :: IO a -> ImprovingIO i f a
data i :~> f
Finished :: f -> (:~>) i f
Improving :: i -> (i :~> f) -> (:~>) i f
bimapImproving :: (a -> c) -> (b -> d) -> (a :~> b) -> c :~> d
improvingLast :: (a :~> b) -> b
consumeImproving :: (a :~> b) -> [a :~> b]
data ImprovingIO i f a
yieldImprovement :: i -> ImprovingIO i f ()
runImprovingIO :: ImprovingIO i f f -> IO (i :~> f, IO ())
tunnelImprovingIO :: ImprovingIO i f (ImprovingIO i f a -> IO a)

-- | Given a number of microseconds and an improving IO action, run that
--   improving IO action only for at most the given period before giving
--   up. See also timeout.
timeoutImprovingIO :: Int -> ImprovingIO i f a -> ImprovingIO i f (Maybe a)

-- | As timeoutImprovingIO, but don't bother applying a timeout to
--   the action if Nothing is given as the number of microseconds
--   to apply the time out for.
maybeTimeoutImprovingIO :: Maybe Int -> ImprovingIO i f a -> ImprovingIO i f (Maybe a)
orElse :: Maybe a -> a -> a
newtype K a
K :: a -> K a
[unK] :: K a -> a
secondsToMicroseconds :: Num a => a -> a
microsecondsToPicoseconds :: Num a => a -> a
listToMaybeLast :: [a] -> Maybe a
mappendBy :: Monoid b => (a -> b) -> a -> a -> b
onLeft :: (a -> c) -> (a, b) -> (c, b)
onRight :: (b -> c) -> (a, b) -> (a, c)

-- | Like unlines, but does not append a trailing newline if there
--   is at least one line. For example:
--   
--   
--   unlinesConcise ["A", "B"] == "A\nB"
--   unlinesConcise [] == ""
--   
--   
--   Whereas:
--   
--   
--   unlines ["A", "B"] == "A\nB\n"
--   unlines [] == ""
--   
--   
--   This is closer to the behaviour of unwords, which does not
--   append a trailing space.
unlinesConcise :: [String] -> String
mapAccumLM :: Monad m => (acc -> x -> m (acc, y)) -> acc -> [x] -> m (acc, [y])
padRight :: Int -> String -> String
dropLast :: Int -> [a] -> [a]

-- | A generic test framework for all types of Haskell test.
--   
--   For an example of how to use test-framework, please see
--   http://github.com/batterseapower/test-framework/raw/master/example/Test/Framework/Example.lhs
module Test.Framework

-- | Main test data type: builds up a list of tests to be run. Users should
--   use the utility functions in e.g. the test-framework-hunit and
--   test-framework-quickcheck2 packages to create instances of
--   Test, and then build them up into testsuites by using
--   testGroup and lists.
--   
--   For an example of how to use test-framework, please see
--   http://github.com/batterseapower/test-framework/raw/master/example/Test/Framework/Example.lhs
data Test

-- | Test names or descriptions. These are shown to the user
type TestName = String

-- | Assemble a number of tests into a cohesive group
testGroup :: TestName -> [Test] -> Test

-- | Add some options to child tests
plusTestOptions :: TestOptions -> Test -> Test

-- | Convenience for creating tests from an IO action
buildTest :: IO Test -> Test

-- | Convenience for creating tests from an IO action, with a
--   cleanup handler for when tests are finished
buildTestBracketed :: IO (Test, IO ()) -> Test

-- | Mark all tests in this portion of the tree as mutually exclusive, so
--   only one runs at a time
mutuallyExclusive :: Test -> Test
