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

-- | A Testing Framework for Haskell
--   
--   This package provides a stable API that can be used to extend Hspec's
--   functionality.
@package hspec-api
@version 2.11.16

module Test.Hspec.Api.Format.V2
type Format = Event -> IO ()

data FormatConfig
FormatConfig :: Bool -> Bool -> Bool -> Bool -> Maybe Int -> Maybe (String -> String -> IO ()) -> Maybe (String -> String -> (String, String)) -> (SomeException -> String) -> Bool -> Bool -> Bool -> Integer -> Int -> FormatConfig
[formatConfigUseColor] :: FormatConfig -> Bool
[formatConfigReportProgress] :: FormatConfig -> Bool
[formatConfigOutputUnicode] :: FormatConfig -> Bool
[formatConfigUseDiff] :: FormatConfig -> Bool
[formatConfigDiffContext] :: FormatConfig -> Maybe Int
[formatConfigExternalDiff] :: FormatConfig -> Maybe (String -> String -> IO ())
[formatConfigPrettyPrintFunction] :: FormatConfig -> Maybe (String -> String -> (String, String))

[formatConfigFormatException] :: FormatConfig -> SomeException -> String
[formatConfigPrintTimes] :: FormatConfig -> Bool
[formatConfigHtmlOutput] :: FormatConfig -> Bool
[formatConfigPrintCpuTime] :: FormatConfig -> Bool
[formatConfigUsedSeed] :: FormatConfig -> Integer
[formatConfigExpectedTotalCount] :: FormatConfig -> Int
defaultFormatConfig :: FormatConfig
data Event
Started :: Event
GroupStarted :: Path -> Event
GroupDone :: Path -> Event
Progress :: Path -> Progress -> Event
ItemStarted :: Path -> Event
ItemDone :: Path -> Item -> Event
Done :: [(Path, Item)] -> Event

-- | (CurrentItem, TotalItems) tuple.
type Progress = (Int, Int)

-- | A Path describes the location of a spec item within a spec
--   tree.
--   
--   It consists of a list of group descriptions and a requirement
--   description.
type Path = ([String], String)

-- | Location is used to represent source locations.
data Location
Location :: FilePath -> Int -> Int -> Location
[locationFile] :: Location -> FilePath
[locationLine] :: Location -> Int
[locationColumn] :: Location -> Int
newtype Seconds
Seconds :: Double -> Seconds
data Item
Item :: Maybe Location -> Seconds -> String -> Result -> Item
[itemLocation] :: Item -> Maybe Location
[itemDuration] :: Item -> Seconds
[itemInfo] :: Item -> String
[itemResult] :: Item -> Result
data Result
Success :: Result
Pending :: Maybe Location -> Maybe String -> Result
Failure :: Maybe Location -> FailureReason -> Result
data FailureReason
NoReason :: FailureReason
Reason :: String -> FailureReason
ColorizedReason :: String -> FailureReason
ExpectedButGot :: Maybe String -> String -> String -> FailureReason
Error :: Maybe String -> SomeException -> FailureReason
monadic :: MonadIO m => (m () -> IO ()) -> (Event -> m ()) -> IO Format

-- | Make a formatter available for use with --format.
registerFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config

-- | Make a formatter available for use with --format and use it
--   by default.
useFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config

-- | Make a formatter compatible with types from
--   Test.Hspec.Core.Format.
liftFormatter :: (String, FormatConfig -> IO Format) -> (String, FormatConfig -> IO Format)

-- | A SpecWith a represents a test or group of tests that
--   require an a value to run.
--   
--   In the common case, a Spec is a SpecWith ()
--   which requires () and can thus be executed with hspec.
--   
--   To supply an argument to SpecWith tests to turn them into
--   Spec, use functions from Test.Hspec.Core.Hooks such as
--   around, before, mapSubject and similar.
--   
--   Values of this type are created by it, describe and
--   similar.
type SpecWith a = SpecM a ()
data Config

modifyConfig :: (Config -> Config) -> SpecWith a

module Test.Hspec.Api.Format.V1
type Format = Event -> IO ()
data FormatConfig
FormatConfig :: Bool -> Bool -> Bool -> Bool -> Maybe Int -> Maybe (String -> String -> IO ()) -> Bool -> Maybe (String -> String -> (String, String)) -> Bool -> Bool -> Bool -> Integer -> Int -> FormatConfig
[formatConfigUseColor] :: FormatConfig -> Bool
[formatConfigReportProgress] :: FormatConfig -> Bool
[formatConfigOutputUnicode] :: FormatConfig -> Bool
[formatConfigUseDiff] :: FormatConfig -> Bool
[formatConfigDiffContext] :: FormatConfig -> Maybe Int
[formatConfigExternalDiff] :: FormatConfig -> Maybe (String -> String -> IO ())

-- | Deprecated: use formatConfigPrettyPrintFunction instead
[formatConfigPrettyPrint] :: FormatConfig -> Bool
[formatConfigPrettyPrintFunction] :: FormatConfig -> Maybe (String -> String -> (String, String))
[formatConfigPrintTimes] :: FormatConfig -> Bool
[formatConfigHtmlOutput] :: FormatConfig -> Bool
[formatConfigPrintCpuTime] :: FormatConfig -> Bool
[formatConfigUsedSeed] :: FormatConfig -> Integer
[formatConfigExpectedTotalCount] :: FormatConfig -> Int
data Event
Started :: Event
GroupStarted :: Path -> Event
GroupDone :: Path -> Event
Progress :: Path -> Progress -> Event
ItemStarted :: Path -> Event
ItemDone :: Path -> Item -> Event
Done :: [(Path, Item)] -> Event

-- | (CurrentItem, TotalItems) tuple.
type Progress = (Int, Int)

-- | A Path describes the location of a spec item within a spec
--   tree.
--   
--   It consists of a list of group descriptions and a requirement
--   description.
type Path = ([String], String)

-- | Location is used to represent source locations.
data Location
Location :: FilePath -> Int -> Int -> Location
[locationFile] :: Location -> FilePath
[locationLine] :: Location -> Int
[locationColumn] :: Location -> Int
newtype Seconds
Seconds :: Double -> Seconds
data Item
Item :: Maybe Location -> Seconds -> String -> Result -> Item
[itemLocation] :: Item -> Maybe Location
[itemDuration] :: Item -> Seconds
[itemInfo] :: Item -> String
[itemResult] :: Item -> Result
data Result
Success :: Result
Pending :: Maybe Location -> Maybe String -> Result
Failure :: Maybe Location -> FailureReason -> Result
data FailureReason
NoReason :: FailureReason
Reason :: String -> FailureReason
ExpectedButGot :: Maybe String -> String -> String -> FailureReason
Error :: Maybe String -> SomeException -> FailureReason
monadic :: MonadIO m => (m () -> IO ()) -> (Event -> m ()) -> IO Format

-- | Make a formatter available for use with --format.
registerFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config

-- | Make a formatter available for use with --format and use it
--   by default.
useFormatter :: (String, FormatConfig -> IO Format) -> Config -> Config

-- | Make a formatter compatible with types from
--   Test.Hspec.Core.Format.
liftFormatter :: (String, FormatConfig -> IO Format) -> (String, FormatConfig -> IO Format)

-- | A SpecWith a represents a test or group of tests that
--   require an a value to run.
--   
--   In the common case, a Spec is a SpecWith ()
--   which requires () and can thus be executed with hspec.
--   
--   To supply an argument to SpecWith tests to turn them into
--   Spec, use functions from Test.Hspec.Core.Hooks such as
--   around, before, mapSubject and similar.
--   
--   Values of this type are created by it, describe and
--   similar.
type SpecWith a = SpecM a ()
data Config

modifyConfig :: (Config -> Config) -> SpecWith a
instance GHC.Internal.Show.Show Test.Hspec.Api.Format.V1.Event

-- | This module contains formatters that can be used with
--   hspecWith:
--   
--   
--   import Test.Hspec
--   import Test.Hspec.Api.Formatters.V1
--   
--   main :: IO ()
--   main = hspecWith (useFormatter ("my-formatter", formatter) defaultConfig) spec
--   
--   formatter :: Formatter
--   formatter = ...
--   
--   spec :: Spec
--   spec = ...
--   
module Test.Hspec.Api.Formatters.V1

-- | Make a formatter available for use with --format and use it
--   by default.
useFormatter :: (String, Formatter) -> Config -> Config
formatterToFormat :: Formatter -> FormatConfig -> IO Format
silent :: Formatter
checks :: Formatter
specdoc :: Formatter
progress :: Formatter
failed_examples :: Formatter
data Formatter
Formatter :: FormatM () -> ([String] -> String -> FormatM ()) -> FormatM () -> (Path -> FormatM ()) -> (Path -> Progress -> FormatM ()) -> (Path -> String -> FormatM ()) -> (Path -> String -> FailureReason -> FormatM ()) -> (Path -> String -> Maybe String -> FormatM ()) -> FormatM () -> FormatM () -> Formatter
[headerFormatter] :: Formatter -> FormatM ()
[exampleGroupStarted] :: Formatter -> [String] -> String -> FormatM ()
[exampleGroupDone] :: Formatter -> FormatM ()
[exampleStarted] :: Formatter -> Path -> FormatM ()
[exampleProgress] :: Formatter -> Path -> Progress -> FormatM ()
[exampleSucceeded] :: Formatter -> Path -> String -> FormatM ()
[exampleFailed] :: Formatter -> Path -> String -> FailureReason -> FormatM ()
[examplePending] :: Formatter -> Path -> String -> Maybe String -> FormatM ()
[failedFormatter] :: Formatter -> FormatM ()
[footerFormatter] :: Formatter -> FormatM ()
data FailureReason
NoReason :: FailureReason
Reason :: String -> FailureReason
ExpectedButGot :: Maybe String -> String -> String -> FailureReason
Error :: Maybe String -> SomeException -> FailureReason
type FormatM = Free FormatF

-- | Get the number of successful examples encountered so far.
getSuccessCount :: FormatM Int

-- | Get the number of pending examples encountered so far.
getPendingCount :: FormatM Int

-- | Get the number of failed examples encountered so far.
getFailCount :: FormatM Int

-- | Get the total number of examples encountered so far.
getTotalCount :: FormatM Int
data FailureRecord
FailureRecord :: Maybe Location -> Path -> FailureReason -> FailureRecord
[failureRecordLocation] :: FailureRecord -> Maybe Location
[failureRecordPath] :: FailureRecord -> Path
[failureRecordMessage] :: FailureRecord -> FailureReason

-- | Get the list of accumulated failure messages.
getFailMessages :: FormatM [FailureRecord]

-- | The random seed that is used for QuickCheck.
usedSeed :: FormatM Integer
newtype Seconds
Seconds :: Double -> Seconds

-- | Get the used CPU time since the test run has been started.
getCPUTime :: FormatM (Maybe Seconds)

-- | Get the passed real time since the test run has been started.
getRealTime :: FormatM Seconds

-- | Append some output to the report.
write :: String -> FormatM ()

-- | The same as write, but adds a newline character.
writeLine :: String -> FormatM ()
writeTransient :: String -> FormatM ()

-- | Set output color to cyan, run given action, and finally restore the
--   default color.
withInfoColor :: FormatM a -> FormatM a

-- | Set output color to green, run given action, and finally restore the
--   default color.
withSuccessColor :: FormatM a -> FormatM a

-- | Set output color to yellow, run given action, and finally restore the
--   default color.
withPendingColor :: FormatM a -> FormatM a

-- | Set output color to red, run given action, and finally restore the
--   default color.
withFailColor :: FormatM a -> FormatM a

-- | Return True if the user requested colorized diffs, False
--   otherwise.
useDiff :: FormatM Bool

-- | Output given chunk in red.
extraChunk :: String -> FormatM ()

-- | Output given chunk in green.
missingChunk :: String -> FormatM ()

-- | The function formatException converts an exception to a string.
--   
--   This is different from show. The type of the exception is
--   included, e.g.:
--   
--   
--   >>> formatException (toException DivideByZero)
--   "ArithException\ndivide by zero"
--   
--   
--   For IOExceptions the IOErrorType is included, as well.
formatException :: SomeException -> String

-- | Location is used to represent source locations.
data Location
Location :: FilePath -> Int -> Int -> Location
[locationFile] :: Location -> FilePath
[locationLine] :: Location -> Int
[locationColumn] :: Location -> Int

-- | (CurrentItem, TotalItems) tuple.
type Progress = (Int, Int)

-- | A SpecWith a represents a test or group of tests that
--   require an a value to run.
--   
--   In the common case, a Spec is a SpecWith ()
--   which requires () and can thus be executed with hspec.
--   
--   To supply an argument to SpecWith tests to turn them into
--   Spec, use functions from Test.Hspec.Core.Hooks such as
--   around, before, mapSubject and similar.
--   
--   Values of this type are created by it, describe and
--   similar.
type SpecWith a = SpecM a ()
data Config

modifyConfig :: (Config -> Config) -> SpecWith a

-- | This module contains formatters that can be used with
--   hspecWith:
--   
--   
--   import Test.Hspec
--   import Test.Hspec.Api.Formatters.V1
--   
--   main :: IO ()
--   main = hspecWith (useFormatter ("my-formatter", formatter) defaultConfig) spec
--   
--   formatter :: Formatter
--   formatter = ...
--   
--   spec :: Spec
--   spec = ...
--   
module Test.Hspec.Api.Formatters.V3

-- | Make a formatter available for use with --format.
registerFormatter :: (String, Formatter) -> Config -> Config

-- | Make a formatter available for use with --format and use it
--   by default.
useFormatter :: (String, Formatter) -> Config -> Config
formatterToFormat :: Formatter -> FormatConfig -> IO Format
silent :: Formatter
checks :: Formatter
specdoc :: Formatter
progress :: Formatter
failed_examples :: Formatter
data Formatter
Formatter :: FormatM () -> (Path -> FormatM ()) -> (Path -> FormatM ()) -> (Path -> Progress -> FormatM ()) -> (Path -> FormatM ()) -> (Path -> Item -> FormatM ()) -> FormatM () -> Formatter
[formatterStarted] :: Formatter -> FormatM ()
[formatterGroupStarted] :: Formatter -> Path -> FormatM ()
[formatterGroupDone] :: Formatter -> Path -> FormatM ()
[formatterProgress] :: Formatter -> Path -> Progress -> FormatM ()
[formatterItemStarted] :: Formatter -> Path -> FormatM ()
[formatterItemDone] :: Formatter -> Path -> Item -> FormatM ()
[formatterDone] :: Formatter -> FormatM ()

-- | A Path describes the location of a spec item within a spec
--   tree.
--   
--   It consists of a list of group descriptions and a requirement
--   description.
type Path = ([String], String)

-- | (CurrentItem, TotalItems) tuple.
type Progress = (Int, Int)

-- | Location is used to represent source locations.
data Location
Location :: FilePath -> Int -> Int -> Location
[locationFile] :: Location -> FilePath
[locationLine] :: Location -> Int
[locationColumn] :: Location -> Int
data Item
Item :: Maybe Location -> Seconds -> String -> Result -> Item
[itemLocation] :: Item -> Maybe Location
[itemDuration] :: Item -> Seconds
[itemInfo] :: Item -> String
[itemResult] :: Item -> Result
data Result
Success :: Result
Pending :: Maybe Location -> Maybe String -> Result
Failure :: Maybe Location -> FailureReason -> Result
data FailureReason
NoReason :: FailureReason
Reason :: String -> FailureReason
ColorizedReason :: String -> FailureReason
ExpectedButGot :: Maybe String -> String -> String -> FailureReason
Error :: Maybe String -> SomeException -> FailureReason
data FormatM a

getConfig :: FormatM FormatConfig

getConfigValue :: (FormatConfig -> a) -> FormatM a

data FormatConfig
FormatConfig :: Bool -> Bool -> Bool -> Bool -> Maybe Int -> Maybe (String -> String -> IO ()) -> Maybe (String -> String -> (String, String)) -> (SomeException -> String) -> Bool -> Bool -> Bool -> Integer -> Int -> FormatConfig
[formatConfigUseColor] :: FormatConfig -> Bool
[formatConfigReportProgress] :: FormatConfig -> Bool
[formatConfigOutputUnicode] :: FormatConfig -> Bool
[formatConfigUseDiff] :: FormatConfig -> Bool
[formatConfigDiffContext] :: FormatConfig -> Maybe Int
[formatConfigExternalDiff] :: FormatConfig -> Maybe (String -> String -> IO ())
[formatConfigPrettyPrintFunction] :: FormatConfig -> Maybe (String -> String -> (String, String))

[formatConfigFormatException] :: FormatConfig -> SomeException -> String
[formatConfigPrintTimes] :: FormatConfig -> Bool
[formatConfigHtmlOutput] :: FormatConfig -> Bool
[formatConfigPrintCpuTime] :: FormatConfig -> Bool
[formatConfigUsedSeed] :: FormatConfig -> Integer
[formatConfigExpectedTotalCount] :: FormatConfig -> Int
defaultFormatConfig :: FormatConfig

-- | Get the number of successful examples encountered so far.
getSuccessCount :: FormatM Int

-- | Get the number of pending examples encountered so far.
getPendingCount :: FormatM Int

-- | Get the number of failed examples encountered so far.
getFailCount :: FormatM Int

-- | Get the total number of examples encountered so far.
getTotalCount :: FormatM Int

-- | Get the number of spec items that will have been encountered when this
--   run completes (if it is not terminated early).
getExpectedTotalCount :: FormatM Int
data FailureRecord
FailureRecord :: Maybe Location -> Path -> FailureReason -> FailureRecord
[failureRecordLocation] :: FailureRecord -> Maybe Location
[failureRecordPath] :: FailureRecord -> Path
[failureRecordMessage] :: FailureRecord -> FailureReason

-- | Get the list of accumulated failure messages.
getFailMessages :: FormatM [FailureRecord]

-- | The random seed that is used for QuickCheck.
usedSeed :: FormatM Integer

-- | Return True if the user requested time reporting for individual
--   spec items, False otherwise.
printTimes :: FormatM Bool
newtype Seconds
Seconds :: Double -> Seconds

-- | Get the used CPU time since the test run has been started.
getCPUTime :: FormatM (Maybe Seconds)

-- | Get the passed real time since the test run has been started.
getRealTime :: FormatM Seconds

-- | Append some output to the report.
write :: String -> FormatM ()

-- | The same as write, but adds a newline character.
writeLine :: String -> FormatM ()
writeTransient :: String -> FormatM ()

-- | Set output color to cyan, run given action, and finally restore the
--   default color.
withInfoColor :: FormatM a -> FormatM a

-- | Set output color to green, run given action, and finally restore the
--   default color.
withSuccessColor :: FormatM a -> FormatM a

-- | Set output color to yellow, run given action, and finally restore the
--   default color.
withPendingColor :: FormatM a -> FormatM a

-- | Set output color to red, run given action, and finally restore the
--   default color.
withFailColor :: FormatM a -> FormatM a

-- | Return True if the user requested unicode output, False
--   otherwise.
outputUnicode :: FormatM Bool

-- | Return True if the user requested colorized diffs, False
--   otherwise.
useDiff :: FormatM Bool

-- | Return the value of configDiffContext.
diffContext :: FormatM (Maybe Int)

-- | An action for printing diffs.
--   
--   The action takes expected and actual as arguments.
--   
--   When this is a Just-value then it should be used instead of any
--   built-in diff implementation. A Just-value also implies that
--   useDiff returns True.
externalDiffAction :: FormatM (Maybe (String -> String -> IO ()))

-- | Return True if the user requested pretty diffs, False
--   otherwise.
prettyPrint :: FormatM Bool

-- | Return a function for pretty-printing if the user requested pretty
--   diffs, Nothing otherwise.
prettyPrintFunction :: FormatM (Maybe (String -> String -> (String, String)))

-- | Output given chunk in red.
extraChunk :: String -> FormatM ()

-- | Output given chunk in green.
missingChunk :: String -> FormatM ()

-- | Do nothing on `--expert`, otherwise run the given action.
unlessExpert :: FormatM () -> FormatM ()
formatLocation :: Location -> String

-- | The function formatException converts an exception to a string.
--   
--   This is different from show. The type of the exception is
--   included, e.g.:
--   
--   
--   >>> formatException (toException DivideByZero)
--   "ArithException\ndivide by zero"
--   
--   
--   For IOExceptions the IOErrorType is included, as well.
formatException :: SomeException -> String

-- | A SpecWith a represents a test or group of tests that
--   require an a value to run.
--   
--   In the common case, a Spec is a SpecWith ()
--   which requires () and can thus be executed with hspec.
--   
--   To supply an argument to SpecWith tests to turn them into
--   Spec, use functions from Test.Hspec.Core.Hooks such as
--   around, before, mapSubject and similar.
--   
--   Values of this type are created by it, describe and
--   similar.
type SpecWith a = SpecM a ()
data Config

modifyConfig :: (Config -> Config) -> SpecWith a

-- | This module contains formatters that can be used with
--   hspecWith:
--   
--   
--   import Test.Hspec
--   import Test.Hspec.Api.Formatters.V1
--   
--   main :: IO ()
--   main = hspecWith (useFormatter ("my-formatter", formatter) defaultConfig) spec
--   
--   formatter :: Formatter
--   formatter = ...
--   
--   spec :: Spec
--   spec = ...
--   
module Test.Hspec.Api.Formatters.V2

-- | Make a formatter available for use with --format.
registerFormatter :: (String, Formatter) -> Config -> Config

-- | Make a formatter available for use with --format and use it
--   by default.
useFormatter :: (String, Formatter) -> Config -> Config
formatterToFormat :: Formatter -> FormatConfig -> IO Format
silent :: Formatter
checks :: Formatter
specdoc :: Formatter
progress :: Formatter
failed_examples :: Formatter
data Formatter
Formatter :: FormatM () -> (Path -> FormatM ()) -> (Path -> FormatM ()) -> (Path -> Progress -> FormatM ()) -> (Path -> FormatM ()) -> (Path -> Item -> FormatM ()) -> FormatM () -> Formatter
[formatterStarted] :: Formatter -> FormatM ()
[formatterGroupStarted] :: Formatter -> Path -> FormatM ()
[formatterGroupDone] :: Formatter -> Path -> FormatM ()
[formatterProgress] :: Formatter -> Path -> Progress -> FormatM ()
[formatterItemStarted] :: Formatter -> Path -> FormatM ()
[formatterItemDone] :: Formatter -> Path -> Item -> FormatM ()
[formatterDone] :: Formatter -> FormatM ()

-- | A Path describes the location of a spec item within a spec
--   tree.
--   
--   It consists of a list of group descriptions and a requirement
--   description.
type Path = ([String], String)

-- | (CurrentItem, TotalItems) tuple.
type Progress = (Int, Int)

-- | Location is used to represent source locations.
data Location
Location :: FilePath -> Int -> Int -> Location
[locationFile] :: Location -> FilePath
[locationLine] :: Location -> Int
[locationColumn] :: Location -> Int
data Item
Item :: Maybe Location -> Seconds -> String -> Result -> Item
[itemLocation] :: Item -> Maybe Location
[itemDuration] :: Item -> Seconds
[itemInfo] :: Item -> String
[itemResult] :: Item -> Result
data Result
Success :: Result
Pending :: Maybe Location -> Maybe String -> Result
Failure :: Maybe Location -> FailureReason -> Result
data FailureReason
NoReason :: FailureReason
Reason :: String -> FailureReason
ExpectedButGot :: Maybe String -> String -> String -> FailureReason
Error :: Maybe String -> SomeException -> FailureReason
data FormatM a

-- | Get the number of successful examples encountered so far.
getSuccessCount :: FormatM Int

-- | Get the number of pending examples encountered so far.
getPendingCount :: FormatM Int

-- | Get the number of failed examples encountered so far.
getFailCount :: FormatM Int

-- | Get the total number of examples encountered so far.
getTotalCount :: FormatM Int

-- | Get the number of spec items that will have been encountered when this
--   run completes (if it is not terminated early).
getExpectedTotalCount :: FormatM Int
data FailureRecord
FailureRecord :: Maybe Location -> Path -> FailureReason -> FailureRecord
[failureRecordLocation] :: FailureRecord -> Maybe Location
[failureRecordPath] :: FailureRecord -> Path
[failureRecordMessage] :: FailureRecord -> FailureReason

-- | Get the list of accumulated failure messages.
getFailMessages :: FormatM [FailureRecord]

-- | The random seed that is used for QuickCheck.
usedSeed :: FormatM Integer

-- | Return True if the user requested time reporting for individual
--   spec items, False otherwise.
printTimes :: FormatM Bool
newtype Seconds
Seconds :: Double -> Seconds

-- | Get the used CPU time since the test run has been started.
getCPUTime :: FormatM (Maybe Seconds)

-- | Get the passed real time since the test run has been started.
getRealTime :: FormatM Seconds

-- | Append some output to the report.
write :: String -> FormatM ()

-- | The same as write, but adds a newline character.
writeLine :: String -> FormatM ()
writeTransient :: String -> FormatM ()

-- | Set output color to cyan, run given action, and finally restore the
--   default color.
withInfoColor :: FormatM a -> FormatM a

-- | Set output color to green, run given action, and finally restore the
--   default color.
withSuccessColor :: FormatM a -> FormatM a

-- | Set output color to yellow, run given action, and finally restore the
--   default color.
withPendingColor :: FormatM a -> FormatM a

-- | Set output color to red, run given action, and finally restore the
--   default color.
withFailColor :: FormatM a -> FormatM a

-- | Return True if the user requested unicode output, False
--   otherwise.
outputUnicode :: FormatM Bool

-- | Return True if the user requested colorized diffs, False
--   otherwise.
useDiff :: FormatM Bool

-- | Return the value of configDiffContext.
diffContext :: FormatM (Maybe Int)

-- | An action for printing diffs.
--   
--   The action takes expected and actual as arguments.
--   
--   When this is a Just-value then it should be used instead of any
--   built-in diff implementation. A Just-value also implies that
--   useDiff returns True.
externalDiffAction :: FormatM (Maybe (String -> String -> IO ()))

-- | Return True if the user requested pretty diffs, False
--   otherwise.
prettyPrint :: FormatM Bool

-- | Return a function for pretty-printing if the user requested pretty
--   diffs, Nothing otherwise.
prettyPrintFunction :: FormatM (Maybe (String -> String -> (String, String)))

-- | Output given chunk in red.
extraChunk :: String -> FormatM ()

-- | Output given chunk in green.
missingChunk :: String -> FormatM ()
formatLocation :: Location -> String

-- | The function formatException converts an exception to a string.
--   
--   This is different from show. The type of the exception is
--   included, e.g.:
--   
--   
--   >>> formatException (toException DivideByZero)
--   "ArithException\ndivide by zero"
--   
--   
--   For IOExceptions the IOErrorType is included, as well.
formatException :: SomeException -> String

-- | A SpecWith a represents a test or group of tests that
--   require an a value to run.
--   
--   In the common case, a Spec is a SpecWith ()
--   which requires () and can thus be executed with hspec.
--   
--   To supply an argument to SpecWith tests to turn them into
--   Spec, use functions from Test.Hspec.Core.Hooks such as
--   around, before, mapSubject and similar.
--   
--   Values of this type are created by it, describe and
--   similar.
type SpecWith a = SpecM a ()
data Config

modifyConfig :: (Config -> Config) -> SpecWith a
