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


-- | Test interactive Haskell examples
--   
--   The doctest program checks examples in source code comments. It is
--   modeled after doctest for Python
--   (<a>https://docs.python.org/3/library/doctest.html</a>).
--   
--   Documentation is at
--   <a>https://github.com/martijnbastiaan/doctest-parallel#readme</a>.
@package doctest-parallel
@version 0.4

module Test.DocTest.Helpers

-- | Efficient implementation of set like deletion on lists
--   
--   <pre>
--   &gt;&gt;&gt; "abcd" `rmList` "ad"
--   "bc"
--   
--   &gt;&gt;&gt; "aaabcccd" `rmList` "ad"
--   "bccc"
--   </pre>
rmList :: Ord a => [a] -> [a] -> [a]
data Library
Library :: [FilePath] -> [FilePath] -> [ModuleName] -> [Extension] -> [Language] -> Library

-- | Haskell source directories
[libSourceDirectories] :: Library -> [FilePath]

-- | C source directories
[libCSourceDirectories] :: Library -> [FilePath]

-- | Exposed modules
[libModules] :: Library -> [ModuleName]

-- | Extensions enabled by default
[libDefaultExtensions] :: Library -> [Extension]

-- | Language version(s) to enable
[libDefaultLanguages] :: Library -> [Language]

-- | Merge multiple libraries into one, by concatenating all their fields.
mergeLibraries :: [Library] -> Library

-- | Convert a <a>Library</a> to arguments suitable to be passed to GHCi.
libraryToGhciArgs :: Library -> ([String], [String], [String])

-- | Drop a number of elements from the end of the list.
--   
--   <pre>
--   dropEnd 3 "hello"  == "he"
--   dropEnd 5 "bye"    == ""
--   dropEnd (-1) "bye" == "bye"
--   \i xs -&gt; dropEnd i xs `isPrefixOf` xs
--   \i xs -&gt; length (dropEnd i xs) == max 0 (length xs - max 0 i)
--   \i -&gt; take 3 (dropEnd 5 [i..]) == take 3 [i..]
--   </pre>
dropEnd :: Int -> [a] -> [a]

-- | Searches for a file called <tt>package.cabal</tt>, where
--   <tt>package</tt> is given as an argument. It will look for it in the
--   current directory. If it can't find it there, it will traverse up
--   until it finds the file or a file called <tt>cabal.project</tt>. In
--   case of the latter, it will traverse down recursively until it
--   encounters a <tt>package.cabal</tt>.
--   
--   The returned path points to the <tt>package.cabal</tt>. Errors if it
--   could not find <tt>package.cabal</tt> anywhere, or when it found
--   multiple.
findCabalPackage :: HasCallStack => String -> IO FilePath
compatPrettyShow :: SymbolicPath PackageDir SourceDir -> FilePath

-- | Traverse the given tree, solve predicates in branches, and return its
--   contents.
--   
--   XXX: Branches guarded by Cabal flags are ignored. I'm not sure where
--   we should get this info from.
solveCondTree :: CondTree ConfVar c a -> [(c, a)]

-- | GHC version as Cabal's <a>Version</a> data structure
buildGhc :: Version

-- | Given a filepath to a <tt>package.cabal</tt>, parse it, and yield a
--   <a>Library</a>. Yields the default Library if first argument is
--   Nothing, otherwise it will look for a specific sublibrary.
extractSpecificCabalLibrary :: Maybe String -> FilePath -> IO Library

-- | Given a filepath to a <tt>package.cabal</tt>, parse it, and yield a
--   <a>Library</a>. Returns and error if no library was specified in the
--   cabal package file.
extractCabalLibrary :: FilePath -> IO Library
instance GHC.Internal.Show.Show Test.DocTest.Helpers.Library

module Test.DocTest.Internal.GhcUtil

-- | Run a GHC action in Haddock mode
withGhc :: [String] -> Ghc a -> IO a

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
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.DocTest.Internal.Location.Located a)
instance GHC.Classes.Eq Test.DocTest.Internal.Location.Location
instance GHC.Internal.Base.Functor Test.DocTest.Internal.Location.Located
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Test.DocTest.Internal.Location.Located a)
instance Control.DeepSeq.NFData Test.DocTest.Internal.Location.Location
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.DocTest.Internal.Location.Located a)
instance GHC.Internal.Show.Show Test.DocTest.Internal.Location.Location

module Test.DocTest.Internal.Logging

-- | Convenience type alias - not used in this module, but sprinkled across
--   the project.
type DebugLogger = String -> IO ()

-- | Discards any log message
noLogger :: DebugLogger
data LogLevel

-- | Intended for debug runs
Debug :: LogLevel

-- | Intended for debug runs, but without flooding the user with internal
--   messages
Verbose :: LogLevel

-- | Default log level - print messages user is likely wanting to see
Info :: LogLevel

-- | Only print warnings
Warning :: LogLevel

-- | Only print errors
Error :: LogLevel

-- | Case insensitive
--   
--   <pre>
--   &gt;&gt;&gt; parseLogLevel "Info"
--   Just Info
--   
--   &gt;&gt;&gt; parseLogLevel "info"
--   Just Info
--   
--   &gt;&gt;&gt; parseLogLevel "errox"
--   Nothing
--   </pre>
parseLogLevel :: String -> Maybe LogLevel

-- | Pretty print a <a>LogLevel</a> in a justified manner, i.e., all
--   outputs take the same amount of characters to display.
--   
--   <pre>
--   &gt;&gt;&gt; showJustifiedLogLevel Debug
--   "Debug  "
--   
--   &gt;&gt;&gt; showJustifiedLogLevel Verbose
--   "Verbose"
--   
--   &gt;&gt;&gt; showJustifiedLogLevel Info
--   "Info   "
--   
--   &gt;&gt;&gt; showJustifiedLogLevel Warning
--   "Warning"
--   
--   &gt;&gt;&gt; showJustifiedLogLevel Error
--   "Error  "
--   </pre>
showJustifiedLogLevel :: LogLevel -> String

-- | Justify a list with a custom fill symbol
--   
--   <pre>
--   &gt;&gt;&gt; justifyLeft 10 'x' "foo"
--   "fooxxxxxxx"
--   
--   &gt;&gt;&gt; justifyLeft 3 'x' "foo"
--   "foo"
--   
--   &gt;&gt;&gt; justifyLeft 2 'x' "foo"
--   "foo"
--   </pre>
justifyLeft :: Int -> a -> [a] -> [a]

-- | Pretty name for a <a>ThreadId</a>. Uses <a>threadLabel</a> if
--   available, otherwise falls back to <a>show</a>.
getThreadName :: ThreadId -> IO String

-- | <i>Prettily</i> format a log message
--   
--   <pre>
--   threadId &lt;- myThreadId
--   formatLog Debug (show threadId) "some debug message"
--   </pre>
--   
--   "[DEBUG ] [ThreadId 1277462] some debug message"
formatLog :: String -> LogLevel -> String -> String

-- | Like <a>formatLog</a>, but instantiates the <i>thread</i> argument
--   with the current <a>ThreadId</a>
--   
--   <pre>
--   formatLogHere Debug "some debug message"
--   </pre>
--   
--   "[DEBUG ] [ThreadId 1440849] some debug message"
formatLogHere :: LogLevel -> String -> IO String

-- | Should a message be printed? For a given verbosity level and message
--   log level.
shouldLog :: (?verbosity :: LogLevel) => LogLevel -> Bool

-- | Basic logging function. Uses <a>formatLogHere</a>. Is not thread-safe.
log :: (?verbosity :: LogLevel) => LogLevel -> String -> IO ()
instance GHC.Internal.Enum.Bounded Test.DocTest.Internal.Logging.LogLevel
instance GHC.Internal.Enum.Enum Test.DocTest.Internal.Logging.LogLevel
instance GHC.Classes.Eq Test.DocTest.Internal.Logging.LogLevel
instance GHC.Internal.Generics.Generic Test.DocTest.Internal.Logging.LogLevel
instance Control.DeepSeq.NFData Test.DocTest.Internal.Logging.LogLevel
instance GHC.Classes.Ord Test.DocTest.Internal.Logging.LogLevel
instance GHC.Internal.Show.Show Test.DocTest.Internal.Logging.LogLevel

module Test.DocTest.Internal.GhciWrapper
data Interpreter
data Config
Config :: String -> Bool -> Bool -> Config
[configGhci] :: Config -> String
[configVerbose] :: Config -> Bool
[configIgnoreDotGhci] :: Config -> Bool
defaultConfig :: Config
new :: DebugLogger -> Config -> [String] -> IO Interpreter
close :: Interpreter -> IO ()

-- | Evaluate an expression
eval :: Interpreter -> String -> IO String

-- | Like <a>eval</a>, but try to preserve the <tt>it</tt> variable
evalIt :: Interpreter -> String -> IO String

-- | Evaluate an expression
evalEcho :: Interpreter -> String -> IO String
instance GHC.Classes.Eq Test.DocTest.Internal.GhciWrapper.Config
instance GHC.Internal.Show.Show Test.DocTest.Internal.GhciWrapper.Config

module Test.DocTest.Internal.Interpreter
data Interpreter

-- | Evaluate an expression; return a Left value on exceptions.
--   
--   An exception may e.g. be caused on unterminated multiline expressions.
safeEval :: Interpreter -> String -> IO (Either String String)
safeEvalIt :: Interpreter -> String -> IO (Either String String)

-- | Run an interpreter session.
--   
--   Example:
--   
--   <pre>
--   &gt;&gt;&gt; withInterpreter noLogger [] $ \i -&gt; eval i "23 + 42"
--   "65\n"
--   </pre>
withInterpreter :: DebugLogger -> [String] -> (Interpreter -> IO a) -> IO a
ghc :: FilePath
interpreterSupported :: IO Bool
ghcInfo :: IO [(String, String)]
haveInterpreterKey :: String

module Test.DocTest.Internal.Nix

-- | E.g. <tt>9.0.2</tt>
compilerVersionStr :: String

-- | Traverse upwards until one of the following conditions is met:
--   
--   <ul>
--   <li>Current working directory is either root or a home directory</li>
--   <li>The predicate function returns <a>Just</a></li>
--   </ul>
findDirectoryUp :: (FilePath -> IO (Maybe a)) -> MaybeT IO a

-- | Like <a>findDirectoryUp</a>, but takes a predicate function instead.
--   If the predicate yields <a>True</a>, the filepath is returned.
findDirectoryUpPredicate :: (FilePath -> IO Bool) -> MaybeT IO FilePath

-- | Find the root of the Cabal project relative to the current directory.
findCabalProjectRoot :: MaybeT IO FilePath

-- | Find the local package database in <tt>dist-newstyle</tt>.
findLocalPackageDb :: MaybeT IO FilePath

-- | Are we running in a Nix shell?
inNixShell :: IO Bool

-- | Are we running in a Nix build environment?
inNixBuild :: IO Bool
getLocalCabalPackageDbArgs :: IO [String]
getLocalNixPackageDbArgs :: IO [String]

-- | Get global package db; used in a NIX_SHELL context
getGlobalPackageDb :: IO String

-- | Get flags to be used when running in a Nix context (either in a build,
--   or a shell).
getNixGhciArgs :: IO [String]

module Test.DocTest.Internal.Options
usage :: String
version :: String
ghcVersion :: String
versionInfo :: String
info :: String
data Result a
ResultStderr :: String -> Result a
ResultStdout :: String -> Result a
Result :: a -> Result a
type Warning = String
type ModuleName = String
data Config
Config :: LogLevel -> [ModuleName] -> Maybe Int -> ModuleConfig -> Bool -> [String] -> Config

-- | Verbosity level.
[cfgLogLevel] :: Config -> LogLevel

-- | Module names to test. An empty list means "test all modules".
[cfgModules] :: Config -> [ModuleName]

-- | Number of threads to use. Defaults to autodetection based on the
--   number of cores.
[cfgThreads] :: Config -> Maybe Int

-- | Options specific to modules
[cfgModuleConfig] :: Config -> ModuleConfig

-- | Detect Nix build environment and try to make GHC aware of the local
--   package being tested.
[cfgNix] :: Config -> Bool

-- | Extra arguments passed to GHC when parsing
[cfgGhcArgs] :: Config -> [String]
data ModuleConfig
ModuleConfig :: Bool -> Bool -> Maybe Int -> Bool -> ModuleConfig

-- | Preserve the <tt>it</tt> variable between examples (default:
--   <tt>False</tt>)
[cfgPreserveIt] :: ModuleConfig -> Bool

-- | Randomize the order in which test cases in a module are run (default:
--   <tt>False</tt>)
[cfgRandomizeOrder] :: ModuleConfig -> Bool

-- | Initialize random number generator used to randomize test cases when
--   <a>cfgRandomizeOrder</a> is set. If set to <a>Nothing</a>, a random
--   seed is picked from a system RNG source on startup.
[cfgSeed] :: ModuleConfig -> Maybe Int

-- | Import a module before testing it. Can be disabled to enabled to test
--   non-exposed modules.
[cfgImplicitModuleImport] :: ModuleConfig -> Bool
defaultModuleConfig :: ModuleConfig
defaultConfig :: Config
parseLocatedModuleOptions :: ModuleName -> ModuleConfig -> [Located String] -> Either (Location, String) ModuleConfig
parseModuleOption :: ModuleConfig -> String -> Maybe ModuleConfig
parseOptions :: [String] -> Result Config

-- | Parse ghc-arg argument
--   
--   <pre>
--   &gt;&gt;&gt; parseGhcArg "--ghc-arg=foobar"
--   Just "foobar"
--   </pre>
parseGhcArg :: String -> Maybe String

-- | Parse seed argument
--   
--   <pre>
--   &gt;&gt;&gt; parseSeed "--seed=6"
--   Just 6
--   
--   &gt;&gt;&gt; parseSeed "--seeeed=6"
--   Nothing
--   </pre>
parseSeed :: String -> Maybe Int

-- | Parse seed argument
--   
--   <pre>
--   &gt;&gt;&gt; parseLogLevel "--log-level=Debug"
--   Just Debug
--   
--   &gt;&gt;&gt; parseLogLevel "--log-level=debug"
--   Just Debug
--   
--   &gt;&gt;&gt; parseSeed "---log-level=debug"
--   Nothing
--   </pre>
parseLogLevel :: String -> Maybe LogLevel

-- | Parse number of threads argument
--   
--   <pre>
--   &gt;&gt;&gt; parseThreads "-j6"
--   Just 6
--   
--   &gt;&gt;&gt; parseThreads "-j-2"
--   Nothing
--   
--   &gt;&gt;&gt; parseThreads "-jA"
--   Nothing
--   </pre>
parseThreads :: String -> Maybe Int

-- | Parse a specific flag with a value, or return <a>Nothing</a>
--   
--   <pre>
--   &gt;&gt;&gt; parseSpecificFlag "--foo" "foo"
--   Nothing
--   
--   &gt;&gt;&gt; parseSpecificFlag "--foo=" "foo"
--   Nothing
--   
--   &gt;&gt;&gt; parseSpecificFlag "--foo=5" "foo"
--   Just "5"
--   
--   &gt;&gt;&gt; parseSpecificFlag "--foo=5" "bar"
--   Nothing
--   </pre>
parseSpecificFlag :: String -> String -> Maybe String

-- | Parse a flag into its flag and argument component.
--   
--   Example:
--   
--   <pre>
--   &gt;&gt;&gt; parseFlag "--optghc=foo"
--   ("--optghc",Just "foo")
--   
--   &gt;&gt;&gt; parseFlag "--optghc="
--   ("--optghc",Nothing)
--   
--   &gt;&gt;&gt; parseFlag "--fast"
--   ("--fast",Nothing)
--   </pre>
parseFlag :: String -> (String, Maybe String)
instance GHC.Classes.Eq Test.DocTest.Internal.Options.Config
instance GHC.Classes.Eq Test.DocTest.Internal.Options.ModuleConfig
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.DocTest.Internal.Options.Result a)
instance GHC.Internal.Base.Functor Test.DocTest.Internal.Options.Result
instance GHC.Internal.Generics.Generic Test.DocTest.Internal.Options.Config
instance GHC.Internal.Generics.Generic Test.DocTest.Internal.Options.ModuleConfig
instance Control.DeepSeq.NFData Test.DocTest.Internal.Options.Config
instance Control.DeepSeq.NFData Test.DocTest.Internal.Options.ModuleConfig
instance GHC.Internal.Show.Show Test.DocTest.Internal.Options.Config
instance GHC.Internal.Show.Show Test.DocTest.Internal.Options.ModuleConfig
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.DocTest.Internal.Options.Result a)

module Test.DocTest.Internal.Util
convertDosLineEndings :: String -> String

-- | Return the longest suffix of elements that satisfy a given predicate.
takeWhileEnd :: (a -> Bool) -> [a] -> [a]

-- | Remove trailing white space from a string.
--   
--   <pre>
--   &gt;&gt;&gt; stripEnd "foo   "
--   "foo"
--   </pre>
stripEnd :: String -> String

module Test.DocTest.Internal.Extract

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

-- | 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).
--   
--   Can throw <a>ExtractError</a> if an error occurs while extracting the
--   docstrings, or a <tt>SourceError</tt> if an error occurs while parsing
--   the module. Can throw a <a>ModuleNotFoundError</a> if a module's
--   source file cannot be found.
extract :: String -> Ghc (Module (Located String))

-- | Like <a>extract</a>, but runs in the <a>IO</a> monad given GHC parse
--   arguments.
extractIO :: [String] -> String -> IO (Module (Located String))
eraseConfigLocation :: Module a -> Module a
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.DocTest.Internal.Extract.Module a)
instance GHC.Internal.Exception.Type.Exception Test.DocTest.Internal.Extract.ExtractError
instance GHC.Internal.Exception.Type.Exception Test.DocTest.Internal.Extract.ModuleNotFoundError
instance GHC.Internal.Base.Functor Test.DocTest.Internal.Extract.Module
instance GHC.Internal.Generics.Generic (Test.DocTest.Internal.Extract.Module a)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Test.DocTest.Internal.Extract.Module a)
instance GHC.Internal.Show.Show Test.DocTest.Internal.Extract.ExtractError
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.DocTest.Internal.Extract.Module a)
instance GHC.Internal.Show.Show Test.DocTest.Internal.Extract.ModuleNotFoundError

module Test.DocTest.Internal.Parse

-- | Documentation for a module grouped together with the modules name.
data Module a
Module :: String -> Maybe a -> [a] -> [Located String] -> Module a
[moduleName] :: Module a -> String
[moduleSetup] :: Module a -> Maybe a
[moduleContent] :: Module a -> [a]
[moduleConfig] :: Module a -> [Located String]
data DocTest
Example :: Expression -> ExpectedResult -> DocTest
Property :: Expression -> DocTest
type Interaction = (Expression, ExpectedResult)
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 given module
getDocTests :: String -> Ghc (Module [Located DocTest])

-- | Extract <a>DocTest</a>s from given module
getDocTestsIO :: [String] -> String -> IO (Module [Located DocTest])

-- | Extract all interactions from given Haddock comment.
parseInteractions :: Located String -> [Located Interaction]

-- | Extract all properties from given Haddock comment.
parseProperties :: Located String -> [Located Expression]
mkLineChunks :: String -> [LineChunk]
instance GHC.Classes.Eq Test.DocTest.Internal.Parse.DocTest
instance GHC.Classes.Eq Test.DocTest.Internal.Parse.ExpectedLine
instance GHC.Classes.Eq Test.DocTest.Internal.Parse.LineChunk
instance GHC.Internal.Data.String.IsString Test.DocTest.Internal.Parse.ExpectedLine
instance GHC.Internal.Data.String.IsString Test.DocTest.Internal.Parse.LineChunk
instance GHC.Internal.Show.Show Test.DocTest.Internal.Parse.DocTest
instance GHC.Internal.Show.Show Test.DocTest.Internal.Parse.ExpectedLine
instance GHC.Internal.Show.Show Test.DocTest.Internal.Parse.LineChunk

module Test.DocTest.Internal.Runner.Example
data Result
Equal :: Result
NotEqual :: [String] -> Result
mkResult :: ExpectedResult -> [String] -> Result
instance GHC.Classes.Eq a => GHC.Classes.Eq (Test.DocTest.Internal.Runner.Example.Match a)
instance GHC.Classes.Eq Test.DocTest.Internal.Runner.Example.Result
instance GHC.Internal.Base.Functor Test.DocTest.Internal.Runner.Example.Match
instance GHC.Classes.Ord a => GHC.Classes.Ord (Test.DocTest.Internal.Runner.Example.Match a)
instance GHC.Internal.Show.Show Test.DocTest.Internal.Runner.Example.ChunksDivergence
instance GHC.Internal.Show.Show Test.DocTest.Internal.Runner.Example.LinesDivergence
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Test.DocTest.Internal.Runner.Example.Match a)
instance GHC.Internal.Show.Show Test.DocTest.Internal.Runner.Example.Result

module Test.DocTest.Internal.Property

-- | The result of evaluating an interaction.
data PropertyResult
Success :: PropertyResult
Failure :: String -> PropertyResult
Error :: String -> PropertyResult
runProperty :: Interpreter -> Expression -> IO PropertyResult

-- | Find all free variables in given term.
--   
--   GHCi is used to detect free variables.
freeVariables :: Interpreter -> String -> IO [String]

-- | Parse and return all variables that are not in scope from a ghc error
--   message.
parseNotInScope :: String -> [String]
instance GHC.Classes.Eq Test.DocTest.Internal.Property.PropertyResult
instance GHC.Internal.Show.Show Test.DocTest.Internal.Property.PropertyResult

module Test.DocTest.Internal.Runner

-- | Whether an "example" is part of setup block
data FromSetup
FromSetup :: FromSetup
NotFromSetup :: FromSetup

-- | Summary of a test run.
data Summary
Summary :: Int -> Int -> Int -> Int -> Summary

-- | Total number of lines of examples (excluding setup)
[sExamples] :: Summary -> Int

-- | Executed <i>sTried</i> lines so far
[sTried] :: Summary -> Int

-- | Couldn't execute <i>sErrors</i> examples
[sErrors] :: Summary -> Int

-- | Got unexpected output for <i>sFailures</i> examples
[sFailures] :: Summary -> Int
emptySummary :: Summary

-- | Run all examples from a list of modules.
runModules :: (?verbosity :: LogLevel) => ModuleConfig -> Maybe Int -> Bool -> [String] -> [String] -> [ModuleName] -> IO Summary

-- | Count number of expressions in given module.
count :: Module [Located DocTest] -> Int

-- | A monad for generating test reports.
type Report = StateT ReportState IO
data ReportState
ReportState :: Int -> Bool -> Summary -> ReportState

-- | characters on the current line
[reportStateCount] :: ReportState -> Int

-- | should intermediate results be printed?
[reportStateInteractive] :: ReportState -> Bool

-- | test summary
[reportStateSummary] :: ReportState -> Summary

-- | Add output to the report.
report :: (?verbosity :: LogLevel, ?threadId :: ThreadId) => LogLevel -> String -> Report ()

-- | Add intermediate output to the report.
--   
--   This will be overwritten by subsequent calls to
--   <a>report</a>/<a>report_</a>. Intermediate out may not contain any
--   newlines.
report_ :: (?verbosity :: LogLevel) => LogLevel -> String -> Report ()

-- | Add output to the report, overwrite any intermediate out.
overwrite :: String -> Report ()

-- | Shuffle a list given a seed for an RNG
shuffle :: Int -> [a] -> [a]

-- | Run all examples from given module.
runModule :: ModuleConfig -> Bool -> MVar () -> [String] -> Chan (ThreadId, ReportUpdate) -> ModuleName -> Ghc ()
data ReportUpdate

-- | Test succeeded
UpdateSuccess :: FromSetup -> ReportUpdate

-- | Parsed module, found <i>n</i> examples
UpdateModuleParsed :: ModuleName -> Int -> ReportUpdate

-- | Test failed with unexpected result
UpdateFailure :: FromSetup -> Location -> Expression -> [String] -> ReportUpdate

-- | Test failed with an error
UpdateError :: FromSetup -> Location -> Expression -> String -> ReportUpdate

-- | All examples tested in module
UpdateModuleDone :: ReportUpdate

-- | Exception caught while executing internal code
UpdateInternalError :: ModuleName -> SomeException -> ReportUpdate

-- | Could not import module
UpdateImportError :: ModuleName -> Either String String -> ReportUpdate

-- | Unrecognized flag in module specific option
UpdateOptionError :: Location -> String -> ReportUpdate

-- | Unstructured message
UpdateLog :: LogLevel -> String -> ReportUpdate
makeThreadPool :: Int -> [String] -> (Chan (ThreadId, ReportUpdate) -> ModuleName -> Ghc ()) -> IO (Chan ModuleName, Chan (ThreadId, ReportUpdate))
reportModuleParsed :: (?verbosity :: LogLevel, ?threadId :: ThreadId) => ModuleName -> Int -> Report ()
reportFailure :: (?verbosity :: LogLevel, ?threadId :: ThreadId) => FromSetup -> Location -> Expression -> [String] -> Report ()
reportError :: (?verbosity :: LogLevel, ?threadId :: ThreadId) => FromSetup -> Location -> Expression -> String -> Report ()
reportOptionError :: (?verbosity :: LogLevel, ?threadId :: ThreadId) => Location -> String -> Report ()
reportInternalError :: (?verbosity :: LogLevel, ?threadId :: ThreadId) => ModuleName -> SomeException -> Report ()
reportImportError :: (?verbosity :: LogLevel, ?threadId :: ThreadId) => ModuleName -> Either String String -> Report ()
reportSuccess :: (?verbosity :: LogLevel, ?threadId :: ThreadId) => FromSetup -> Report ()
updateSummary :: FromSetup -> Summary -> Report ()
reportProgress :: (?verbosity :: LogLevel) => Report ()

-- | Run given test group.
--   
--   The interpreter state is zeroed with <tt>:reload</tt> first. This
--   means that you can reuse the same <a>Interpreter</a> for several test
--   groups.
runTestGroup :: FromSetup -> Bool -> Interpreter -> IO () -> (ReportUpdate -> IO ()) -> [Located DocTest] -> IO Bool

-- | Execute all expressions from given example in given <a>Interpreter</a>
--   and verify the output.
runExampleGroup :: FromSetup -> Bool -> Interpreter -> (ReportUpdate -> IO ()) -> [Located Interaction] -> IO Bool
safeEvalWith :: Bool -> Interpreter -> String -> IO (Either String String)
instance GHC.Classes.Eq Test.DocTest.Internal.Runner.Summary
instance GHC.Internal.Base.Monoid Test.DocTest.Internal.Runner.Summary
instance GHC.Internal.Base.Semigroup Test.DocTest.Internal.Runner.Summary
instance GHC.Internal.Show.Show Test.DocTest.Internal.Runner.Summary

module Test.DocTest

-- | Run doctest with given list of arguments.
--   
--   Example:
--   
--   <pre>
--   mainFromCabal "my-project" =&lt;&lt; getArgs
--   </pre>
mainFromCabal :: String -> [String] -> IO ()

-- | Like <a>mainFromCabal</a>, but with a given library.
mainFromLibrary :: Library -> [String] -> IO ()

-- | Run doctest given config.
--   
--   Example:
--   
--   <pre>
--   mainFromCabal "my-project" defaultConfig
--   </pre>
mainFromCabalWithConfig :: String -> Config -> IO ()

-- | Run doctests with given library and config.
mainFromLibraryWithConfig :: Library -> Config -> IO ()

-- | Filter modules to be tested against a list of modules to be tested
--   (specified by the user on the command line). If list is empty, test
--   all modules. Throws and error if a non-existing module was specified.
filterModules :: [ModuleName] -> [ModuleName] -> [ModuleName]
isSuccess :: Summary -> Bool
setSeed :: (?verbosity :: LogLevel) => ModuleConfig -> IO ModuleConfig

-- | Run doctest for given library and config. Produce a summary of all
--   tests.
run :: Library -> Config -> IO Summary
