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


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

module Test.DocTest.Internal.Location

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

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

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

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

-- | A line number.
type Line = Int

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

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

-- | Convert a GHC source span to a location.
toLocation :: SrcSpan -> 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 <a>DocTest</a>s from all given modules and all modules
--   included by the given modules.
--   
--   <pre>
--   extractDocTests = fmap <a>parseModules</a> . <a>extract</a>
--   </pre>
extractDocTests :: [String] -> IO [Module [Located DocTest]]
parseModules :: [Module (Located String)] -> [Module [Located DocTest]]

module Test.DocTest.Internal.Run

-- | Run doctest with given list of arguments.
--   
--   Example:
--   
--   <pre>
--   &gt;&gt;&gt; doctest ["-iexample/src", "example/src/Example.hs"]
--   ...
--   Examples: 2  Tried: 2  Errors: 0  Failures: 0
--   </pre>
--   
--   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 ()
doctestWithRepl :: (String, [String]) -> [String] -> IO ()
data Config
Config :: [String] -> Bool -> Bool -> Bool -> (String, [String]) -> Config
[ghcOptions] :: Config -> [String]
[fastMode] :: Config -> Bool
[preserveIt] :: Config -> Bool
[verbose] :: Config -> Bool
[repl] :: Config -> (String, [String])
defaultConfig :: Config
doctestWith :: Config -> IO ()
type Result = Summary

-- | 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
isSuccess :: Result -> Bool
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:
--   
--   <pre>
--   &gt;&gt;&gt; doctest ["-iexample/src", "example/src/Example.hs"]
--   ...
--   Examples: 2  Tried: 2  Errors: 0  Failures: 0
--   </pre>
--   
--   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 ()
