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

-- | Test interactive Haskell examples
--   
--   doctest is a tool that checks examples and
--   properties in Haddock comments. It is similar in spirit to the
--   popular Python module with the same name.
--   
--   Documentation is at https://github.com/sol/doctest#readme.
@package doctest
@version 0.24.2

module Test.DocTest.Internal.Cabal
doctest :: [String] -> IO ()

module Test.DocTest.Internal.Location

-- | A combination of file name and line number.
data Location
UnhelpfulLocation :: String -> Location
Location :: FilePath -> Line -> Location

-- | A line number.
type Line = Int

-- | A thing with a location attached.
data Located a
Located :: Location -> a -> Located a

-- | Discard location information.
unLoc :: Located a -> a

-- | Convert a GHC located thing to a located thing.
toLocated :: Located a -> Located a

-- | Convert a GHC source span to a location.
toLocation :: SrcSpan -> Location

-- | Add dummy location information.
noLocation :: a -> Located a

-- | Create a list from a location, by repeatedly increasing the line
--   number by one.
enumerate :: Location -> [Location]

module Test.DocTest.Internal.Extract

-- | Documentation for a module grouped together with the modules name.
data Module a
Module :: String -> Maybe a -> [a] -> Module a
[moduleName] :: Module a -> String
[moduleSetup] :: Module a -> Maybe a
[moduleContent] :: Module a -> [a]

-- | Extract all docstrings from given list of files/modules.
--   
--   This includes the docstrings of all local modules that are imported
--   from those modules (possibly indirect).
extract :: [String] -> IO [Module (Located String)]

module Test.DocTest.Internal.Parse

-- | Documentation for a module grouped together with the modules name.
data Module a
Module :: String -> Maybe a -> [a] -> Module a
[moduleName] :: Module a -> String
[moduleSetup] :: Module a -> Maybe a
[moduleContent] :: Module a -> [a]
data DocTest
Example :: Expression -> ExpectedResult -> DocTest
Property :: Expression -> DocTest
type Expression = String
type ExpectedResult = [ExpectedLine]
data ExpectedLine
ExpectedLine :: [LineChunk] -> ExpectedLine
WildCardLine :: ExpectedLine
data LineChunk
LineChunk :: String -> LineChunk
WildCardChunk :: LineChunk

-- | Extract DocTests from all given modules and all modules
--   included by the given modules.
--   
--   
--   extractDocTests = fmap parseModules . extract
--   
extractDocTests :: [String] -> IO [Module [Located DocTest]]
parseModules :: [Module (Located String)] -> [Module [Located DocTest]]

module Test.DocTest.Internal.Run
type Result = Summary
data Config
Config :: [String] -> Bool -> Bool -> Bool -> Bool -> (String, [String]) -> Config
[ghcOptions] :: Config -> [String]
[fastMode] :: Config -> Bool
[preserveIt] :: Config -> Bool
[failFast] :: Config -> Bool
[verbose] :: Config -> Bool
[repl] :: Config -> (String, [String])
isSuccess :: Summary -> Bool

-- | Run doctest with given list of arguments.
--   
--   Example:
--   
--   
--   >>> doctest ["-iexample/src", "example/src/Example.hs"]
--   ...
--   Examples: 2  Tried: 2  Errors: 0  Failures: 0
--   
--   
--   This can be used to create a Cabal test suite that runs doctest for
--   your project.
--   
--   If a directory is given, it is traversed to find all .hs and .lhs
--   files inside of it, ignoring hidden entries.
doctest :: [String] -> IO ()
defaultConfig :: Config
doctestWithRepl :: (String, [String]) -> [String] -> IO ()
doctestWith :: Config -> IO ()

-- | Summary of a test run.
data Summary
Summary :: !Int -> !Int -> !Int -> !Int -> Summary
[sExamples] :: Summary -> !Int
[sTried] :: Summary -> !Int
[sErrors] :: Summary -> !Int
[sFailures] :: Summary -> !Int
formatSummary :: Summary -> String
evaluateResult :: Result -> IO ()
doctestWithResult :: Config -> IO Result
runDocTests :: Config -> [Module [Located DocTest]] -> IO Result

module Test.DocTest

-- | Run doctest with given list of arguments.
--   
--   Example:
--   
--   
--   >>> doctest ["-iexample/src", "example/src/Example.hs"]
--   ...
--   Examples: 2  Tried: 2  Errors: 0  Failures: 0
--   
--   
--   This can be used to create a Cabal test suite that runs doctest for
--   your project.
--   
--   If a directory is given, it is traversed to find all .hs and .lhs
--   files inside of it, ignoring hidden entries.
doctest :: [String] -> IO ()
