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


-- | Test discovery for the tasty framework.
--   
--   Automatic test discovery and runner for the tasty framework. Prefix
--   your test case names and tasty-discover will discover, collect and run
--   them. All popular test libraries are covered. Configure once and then
--   just write your tests. Avoid forgetting to add test modules to your
--   Cabal/Hpack files. Tasty ingredients are included along with various
--   configuration options for different use cases. Please see the
--   <a>README.md</a> below for how to get started.
@package tasty-discover
@version 4.2.1


-- | The test driver configuration options module.
--   
--   Anything that can be passed as an argument to the test driver
--   definition exists as a field in the <a>Config</a> type.
module Test.Tasty.Config

-- | The discovery and runner configuration.
data Config
Config :: Maybe GlobPattern -> Maybe String -> Maybe String -> Maybe GlobPattern -> [FilePath] -> [Ingredient] -> [String] -> Bool -> Bool -> Bool -> Config

-- | Glob pattern for matching modules during test discovery.
[modules] :: Config -> Maybe GlobPattern

-- | &gt;: Module suffix.
[moduleSuffix] :: Config -> Maybe String

-- | Name of the generated main module.
[generatedModuleName] :: Config -> Maybe String

-- | Glob pattern for ignoring modules during test discovery.
[ignores] :: Config -> Maybe GlobPattern

-- | &gt;: Ignored modules by full name.
[ignoredModules] :: Config -> [FilePath]

-- | Tasty ingredients to use.
[tastyIngredients] :: Config -> [Ingredient]

-- | Options passed to tasty
[tastyOptions] :: Config -> [String]

-- | &gt;: suffix and look in all modules.
[noModuleSuffix] :: Config -> Bool

-- | Debug the generated module.
[debug] :: Config -> Bool

-- | Tree display for the test results table.
[treeDisplay] :: Config -> Bool

-- | A glob pattern.
type GlobPattern = String

-- | Configuration options parser.
parseConfig :: String -> [String] -> Either String Config

-- | The default configuration
defaultConfig :: Config
instance GHC.Show.Show Test.Tasty.Config.Config


-- | The test generator boilerplate module.
--   
--   Any test that is supported (HUnit, HSpec, etc.) provides here, a
--   generator type with all the context necessary for outputting the
--   necessary boilerplate for the generated main function that will run
--   all the tests.
module Test.Tasty.Generator

-- | The generator type.
data Generator
Generator :: String -> String -> String -> (Test -> String) -> Generator

-- | Generator prefix.
[generatorPrefix] :: Generator -> String

-- | Module import path.
[generatorImport] :: Generator -> String

-- | Generator class.
[generatorClass] :: Generator -> String

-- | Generator setup.
[generatorSetup] :: Generator -> Test -> String

-- | The test type.
data Test
Test :: String -> String -> Test

-- | Module name.
[testModule] :: Test -> String

-- | Function name.
[testFunction] :: Test -> String

-- | All types of tests supported for boilerplate generation.
generators :: [Generator]

-- | Generator retriever (single).
getGenerator :: Test -> Generator

-- | Generator retriever (many).
getGenerators :: [Test] -> [Generator]

-- | Boilerplate formatter.
showSetup :: Test -> String -> String

-- | <a>Test</a> constructor.
mkTest :: FilePath -> String -> Test
instance GHC.Classes.Ord Test.Tasty.Generator.Test
instance GHC.Show.Show Test.Tasty.Generator.Test
instance GHC.Classes.Eq Test.Tasty.Generator.Test


-- | Automatic test discovery and runner for the tasty framework.
module Test.Tasty.Discover

-- | Main function generator, along with all the boilerplate which which
--   will run the discovered tests.
generateTestDriver :: Config -> String -> [String] -> FilePath -> [Test] -> String
newtype ModuleTree
ModuleTree :: Map String (ModuleTree, [String]) -> ModuleTree

-- | Discover the tests modules.
findTests :: FilePath -> Config -> IO [Test]
mkModuleTree :: [Test] -> [String] -> ModuleTree

-- | Show the tests.
showTests :: Config -> [Test] -> [String] -> [String]
instance GHC.Show.Show Test.Tasty.Discover.ModuleTree
instance GHC.Classes.Eq Test.Tasty.Discover.ModuleTree
