    module Hedgehog.Main (
      -- * Running tests
        defaultMain
      ) where

    import           Control.Monad (unless)

    import           System.Exit (exitFailure)
    import           System.IO (BufferMode (LineBuffering), hSetBuffering, stderr, stdout)

    -- | An entry point that can be used as a main function.
    --
    defaultMain :: [IO Bool] -> IO ()
    defaultMain :: [IO Bool] -> IO ()
    defaultMain [IO Bool]
    tests = do
      Handle -> BufferMode -> IO ()
    hSetBuffering Handle
    stdout BufferMode
    LineBuffering
      Handle -> BufferMode -> IO ()
    hSetBuffering Handle
    stderr BufferMode
    LineBuffering
      result <- [Bool] -> Bool
    forall (t :: * -> *). Foldable t => t Bool -> Bool
    and ([Bool] -> Bool) -> IO [Bool] -> IO Bool
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> [IO Bool] -> IO [Bool]
    forall (t :: * -> *) (m :: * -> *) a.
    (Traversable t, Monad m) =>
    t (m a) -> m (t a)
    forall (m :: * -> *) a. Monad m => [m a] -> m [a]
    sequence [IO Bool]
    tests
      unless result
        exitFailure