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

-- | A Testing Framework for Haskell
--   
--   Hspec is a testing framework for Haskell. Some of Hspec's distinctive
--   features are:
--   
--   
--   
- a friendly DSL for defining tests
--   
- integration with QuickCheck, SmallCheck, and HUnit
--   
- parallel test execution
--   
- automatic discovery of test files
--   
--   
--   The Hspec Manual is at http://hspec.github.io/.
@package hspec
@version 2.7.1

module Test.Hspec.Formatters

-- | Warning: This module is used by hspec-discover. It is not
--   part of the public API and may change at any time.
module Test.Hspec.Discover
type Spec = SpecWith ()

-- | Run a given spec and write a report to stdout. Exit with
--   exitFailure if at least one spec item fails.
--   
--   Note: hspec handles command-line options and reads
--   config files. This is not always desired. Use runSpec if you
--   need more control over these aspects.
hspec :: Spec -> IO ()
class IsFormatter a
toFormatter :: IsFormatter a => a -> IO Formatter
hspecWithFormatter :: IsFormatter a => a -> Spec -> IO ()
postProcessSpec :: FilePath -> Spec -> Spec

-- | The describe function combines a list of specs into a larger
--   spec.
describe :: HasCallStack => String -> SpecWith a -> SpecWith a
(++) :: [a] -> [a] -> [a]
seq :: a -> b -> b
filter :: (a -> Bool) -> [a] -> [a]
zip :: [a] -> [b] -> [(a, b)]
print :: Show a => a -> IO ()
fst :: (a, b) -> a
snd :: (a, b) -> b
otherwise :: Bool
map :: (a -> b) -> [a] -> [b]
($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
fromIntegral :: (Integral a, Num b) => a -> b
realToFrac :: (Real a, Fractional b) => a -> b
class Bounded a
minBound :: Bounded a => a
maxBound :: Bounded a => a
class Enum a
succ :: Enum a => a -> a
pred :: Enum a => a -> a
toEnum :: Enum a => Int -> a
fromEnum :: Enum a => a -> Int
enumFrom :: Enum a => a -> [a]
enumFromThen :: Enum a => a -> a -> [a]
enumFromTo :: Enum a => a -> a -> [a]
enumFromThenTo :: Enum a => a -> a -> a -> [a]
class Eq a
(==) :: Eq a => a -> a -> Bool
(/=) :: Eq a => a -> a -> Bool
class Fractional a => Floating a
pi :: Floating a => a
exp :: Floating a => a -> a
log :: Floating a => a -> a
sqrt :: Floating a => a -> a
(**) :: Floating a => a -> a -> a
logBase :: Floating a => a -> a -> a
sin :: Floating a => a -> a
cos :: Floating a => a -> a
tan :: Floating a => a -> a
asin :: Floating a => a -> a
acos :: Floating a => a -> a
atan :: Floating a => a -> a
sinh :: Floating a => a -> a
cosh :: Floating a => a -> a
tanh :: Floating a => a -> a
asinh :: Floating a => a -> a
acosh :: Floating a => a -> a
atanh :: Floating a => a -> a
class Num a => Fractional a
(/) :: Fractional a => a -> a -> a
recip :: Fractional a => a -> a
fromRational :: Fractional a => Rational -> a
class (Real a, Enum a) => Integral a
quot :: Integral a => a -> a -> a
rem :: Integral a => a -> a -> a
div :: Integral a => a -> a -> a
mod :: Integral a => a -> a -> a
quotRem :: Integral a => a -> a -> (a, a)
divMod :: Integral a => a -> a -> (a, a)
toInteger :: Integral a => a -> Integer
class Applicative m => Monad (m :: Type -> Type)
(>>=) :: Monad m => m a -> (a -> m b) -> m b
(>>) :: Monad m => m a -> m b -> m b
return :: Monad m => a -> m a
class Functor (f :: Type -> Type)
fmap :: Functor f => (a -> b) -> f a -> f b
(<$) :: Functor f => a -> f b -> f a
class Num a
(+) :: Num a => a -> a -> a
(-) :: Num a => a -> a -> a
(*) :: Num a => a -> a -> a
negate :: Num a => a -> a
abs :: Num a => a -> a
signum :: Num a => a -> a
fromInteger :: Num a => Integer -> a
class Eq a => Ord a
compare :: Ord a => a -> a -> Ordering
(<) :: Ord a => a -> a -> Bool
(<=) :: Ord a => a -> a -> Bool
(>) :: Ord a => a -> a -> Bool
(>=) :: Ord a => a -> a -> Bool
max :: Ord a => a -> a -> a
min :: Ord a => a -> a -> a
class Read a
readsPrec :: Read a => Int -> ReadS a
readList :: Read a => ReadS [a]
class (Num a, Ord a) => Real a
toRational :: Real a => a -> Rational
class (RealFrac a, Floating a) => RealFloat a
floatRadix :: RealFloat a => a -> Integer
floatDigits :: RealFloat a => a -> Int
floatRange :: RealFloat a => a -> (Int, Int)
decodeFloat :: RealFloat a => a -> (Integer, Int)
encodeFloat :: RealFloat a => Integer -> Int -> a
exponent :: RealFloat a => a -> Int
significand :: RealFloat a => a -> a
scaleFloat :: RealFloat a => Int -> a -> a
isNaN :: RealFloat a => a -> Bool
isInfinite :: RealFloat a => a -> Bool
isDenormalized :: RealFloat a => a -> Bool
isNegativeZero :: RealFloat a => a -> Bool
isIEEE :: RealFloat a => a -> Bool
atan2 :: RealFloat a => a -> a -> a
class (Real a, Fractional a) => RealFrac a
properFraction :: (RealFrac a, Integral b) => a -> (b, a)
truncate :: (RealFrac a, Integral b) => a -> b
round :: (RealFrac a, Integral b) => a -> b
ceiling :: (RealFrac a, Integral b) => a -> b
floor :: (RealFrac a, Integral b) => a -> b
class Show a
showsPrec :: Show a => Int -> a -> ShowS
show :: Show a => a -> String
showList :: Show a => [a] -> ShowS
class Monad m => MonadFail (m :: Type -> Type)
fail :: MonadFail m => String -> m a
class Functor f => Applicative (f :: Type -> Type)
pure :: Applicative f => a -> f a
(<*>) :: Applicative f => f (a -> b) -> f a -> f b
(*>) :: Applicative f => f a -> f b -> f b
(<*) :: Applicative f => f a -> f b -> f a
class Foldable (t :: Type -> Type)
foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
foldr1 :: Foldable t => (a -> a -> a) -> t a -> a
foldl1 :: Foldable t => (a -> a -> a) -> t a -> a
null :: Foldable t => t a -> Bool
length :: Foldable t => t a -> Int
elem :: (Foldable t, Eq a) => a -> t a -> Bool
maximum :: (Foldable t, Ord a) => t a -> a
minimum :: (Foldable t, Ord a) => t a -> a
sum :: (Foldable t, Num a) => t a -> a
product :: (Foldable t, Num a) => t a -> a
class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
class Semigroup a
(<>) :: Semigroup a => a -> a -> a
class Semigroup a => Monoid a
mempty :: Monoid a => a
mappend :: Monoid a => a -> a -> a
mconcat :: Monoid a => [a] -> a
data Bool
False :: Bool
True :: Bool
data Char
data Double
data Float
data Int
data Integer
data Maybe a
Nothing :: Maybe a
Just :: a -> Maybe a
data Ordering
LT :: Ordering
EQ :: Ordering
GT :: Ordering
type Rational = Ratio Integer
data IO a
data Word
data Either a b
Left :: a -> Either a b
Right :: b -> Either a b
type String = [Char]
type ReadS a = String -> [(a, String)]
type IOError = IOException
type FilePath = String
(||) :: Bool -> Bool -> Bool
not :: Bool -> Bool
(&&) :: Bool -> Bool -> Bool
writeFile :: FilePath -> String -> IO ()
readLn :: Read a => IO a
readIO :: Read a => String -> IO a
readFile :: FilePath -> IO String
putStrLn :: String -> IO ()
putStr :: String -> IO ()
putChar :: Char -> IO ()
interact :: (String -> String) -> IO ()
getLine :: IO String
getContents :: IO String
getChar :: IO Char
appendFile :: FilePath -> String -> IO ()
shows :: Show a => a -> ShowS
showString :: String -> ShowS
showParen :: Bool -> ShowS -> ShowS
showChar :: Char -> ShowS
odd :: Integral a => a -> Bool
lcm :: Integral a => a -> a -> a
gcd :: Integral a => a -> a -> a
even :: Integral a => a -> Bool
(^^) :: (Fractional a, Integral b) => a -> b -> a
(^) :: (Num a, Integral b) => a -> b -> a
readParen :: Bool -> ReadS a -> ReadS a
lex :: ReadS String
subtract :: Num a => a -> a -> a
zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
unzip3 :: [(a, b, c)] -> ([a], [b], [c])
unzip :: [(a, b)] -> ([a], [b])
takeWhile :: (a -> Bool) -> [a] -> [a]
take :: Int -> [a] -> [a]
tail :: [a] -> [a]
splitAt :: Int -> [a] -> ([a], [a])
span :: (a -> Bool) -> [a] -> ([a], [a])
scanr1 :: (a -> a -> a) -> [a] -> [a]
scanr :: (a -> b -> b) -> b -> [a] -> [b]
scanl1 :: (a -> a -> a) -> [a] -> [a]
scanl :: (b -> a -> b) -> b -> [a] -> [b]
reverse :: [a] -> [a]
replicate :: Int -> a -> [a]
repeat :: a -> [a]
lookup :: Eq a => a -> [(a, b)] -> Maybe b
last :: [a] -> a
iterate :: (a -> a) -> a -> [a]
init :: [a] -> [a]
head :: [a] -> a
dropWhile :: (a -> Bool) -> [a] -> [a]
drop :: Int -> [a] -> [a]
cycle :: [a] -> [a]
break :: (a -> Bool) -> [a] -> ([a], [a])
(!!) :: [a] -> Int -> a
userError :: String -> IOError
ioError :: IOError -> IO a
undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
until :: (a -> Bool) -> (a -> a) -> a -> a
id :: a -> a
flip :: (a -> b -> c) -> b -> a -> c
const :: a -> b -> a
asTypeOf :: a -> a -> a
(=<<) :: Monad m => (a -> m b) -> m a -> m b
(.) :: (b -> c) -> (a -> b) -> a -> c
($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
uncurry :: (a -> b -> c) -> (a, b) -> c
curry :: ((a, b) -> c) -> a -> b -> c
words :: String -> [String]
unwords :: [String] -> String
unlines :: [String] -> String
lines :: String -> [String]
maybe :: b -> (a -> b) -> Maybe a -> b
(<$>) :: Functor f => (a -> b) -> f a -> f b
sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
or :: Foldable t => t Bool -> Bool
notElem :: (Foldable t, Eq a) => a -> t a -> Bool
mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
concat :: Foldable t => t [a] -> [a]
any :: Foldable t => (a -> Bool) -> t a -> Bool
and :: Foldable t => t Bool -> Bool
all :: Foldable t => (a -> Bool) -> t a -> Bool
either :: (a -> c) -> (b -> c) -> Either a b -> c
read :: Read a => String -> a
reads :: Read a => ReadS a
type ShowS = String -> String
instance Test.Hspec.Discover.IsFormatter (GHC.Types.IO Test.Hspec.Core.Formatters.Monad.Formatter)
instance Test.Hspec.Discover.IsFormatter Test.Hspec.Core.Formatters.Monad.Formatter

module Test.Hspec.Runner

-- | Hspec is a testing framework for Haskell.
--   
--   This is the library reference for Hspec. The User's Manual
--   contains more in-depth documentation.
module Test.Hspec
type Spec = SpecWith ()
type SpecWith a = SpecM a ()
type family Arg e

-- | A type class for examples
class Example e

-- | The it function creates a spec item.
--   
--   A spec item consists of:
--   
--   
--   
- a textual description of a desired behavior
--   
- an example for that behavior
--   
--   
--   
--   describe "absolute" $ do
--     it "returns a positive number when given a negative number" $
--       absolute (-1) == 1
--   
it :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a)

-- | specify is an alias for it.
specify :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a)

-- | The describe function combines a list of specs into a larger
--   spec.
describe :: HasCallStack => String -> SpecWith a -> SpecWith a

-- | context is an alias for describe.
context :: HasCallStack => String -> SpecWith a -> SpecWith a

-- | example is a type restricted version of id. It can be
--   used to get better error messages on type mismatches.
--   
--   Compare e.g.
--   
--   
--   it "exposes some behavior" $ example $ do
--     putStrLn
--   
--   
--   with
--   
--   
--   it "exposes some behavior" $ do
--     putStrLn
--   
example :: Expectation -> Expectation

-- | parallel marks all spec items of the given spec to be safe for
--   parallel evaluation.
parallel :: SpecWith a -> SpecWith a

-- | Run an IO action while constructing the spec tree.
--   
--   SpecM is a monad to construct a spec tree, without executing
--   any spec items. runIO allows you to run IO actions during
--   this construction phase. The IO action is always run when the spec
--   tree is constructed (e.g. even when --dry-run is specified).
--   If you do not need the result of the IO action to construct the spec
--   tree, beforeAll may be more suitable for your use case.
runIO :: IO r -> SpecM a r

-- | pending can be used to mark a spec item as pending.
--   
--   If you want to textually specify a behavior but do not have an example
--   yet, use this:
--   
--   
--   describe "fancyFormatter" $ do
--     it "can format text in a way that everyone likes" $
--       pending
--   
pending :: HasCallStack => Expectation

-- | pendingWith is similar to pending, but it takes an
--   additional string argument that can be used to specify the reason for
--   why the spec item is pending.
pendingWith :: HasCallStack => String -> Expectation

-- | Changing it to xit marks the corresponding spec item as
--   pending.
--   
--   This can be used to temporarily disable a spec item.
xit :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a)

-- | xspecify is an alias for xit.
xspecify :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a)

-- | Changing describe to xdescribe marks all spec items of
--   the corresponding subtree as pending.
--   
--   This can be used to temporarily disable spec items.
xdescribe :: HasCallStack => String -> SpecWith a -> SpecWith a

-- | xcontext is an alias for xdescribe.
xcontext :: HasCallStack => String -> SpecWith a -> SpecWith a

-- | focus focuses all spec items of the given spec.
--   
--   Applying focus to a spec with focused spec items has no effect.
focus :: SpecWith a -> SpecWith a

-- | fit is an alias for fmap focus . it
fit :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a)

-- | fspecify is an alias for fit.
fspecify :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a)

-- | fdescribe is an alias for fmap focus . describe
fdescribe :: HasCallStack => String -> SpecWith a -> SpecWith a

-- | fcontext is an alias for fdescribe.
fcontext :: HasCallStack => String -> SpecWith a -> SpecWith a

-- | An IO action that expects an argument of type a
type ActionWith a = a -> IO ()

-- | Run a custom action before every spec item.
before :: IO a -> SpecWith a -> Spec

-- | Run a custom action before every spec item.
before_ :: IO () -> SpecWith a -> SpecWith a

-- | Run a custom action before every spec item.
beforeWith :: (b -> IO a) -> SpecWith a -> SpecWith b

-- | Run a custom action before the first spec item.
beforeAll :: IO a -> SpecWith a -> Spec

-- | Run a custom action before the first spec item.
beforeAll_ :: IO () -> SpecWith a -> SpecWith a

-- | Run a custom action after every spec item.
after :: ActionWith a -> SpecWith a -> SpecWith a

-- | Run a custom action after every spec item.
after_ :: IO () -> SpecWith a -> SpecWith a

-- | Run a custom action after the last spec item.
afterAll :: ActionWith a -> SpecWith a -> SpecWith a

-- | Run a custom action after the last spec item.
afterAll_ :: IO () -> SpecWith a -> SpecWith a

-- | Run a custom action before and/or after every spec item.
around :: (ActionWith a -> IO ()) -> SpecWith a -> Spec

-- | Run a custom action before and/or after every spec item.
around_ :: (IO () -> IO ()) -> SpecWith a -> SpecWith a

-- | Run a custom action before and/or after every spec item.
aroundWith :: (ActionWith a -> ActionWith b) -> SpecWith a -> SpecWith b

-- | Run a given spec and write a report to stdout. Exit with
--   exitFailure if at least one spec item fails.
--   
--   Note: hspec handles command-line options and reads
--   config files. This is not always desired. Use runSpec if you
--   need more control over these aspects.
hspec :: Spec -> IO ()

module Test.Hspec.QuickCheck

-- | Use modified Args for given spec.
modifyArgs :: (Args -> Args) -> SpecWith a -> SpecWith a

-- | Use a modified maxSuccess for given spec.
modifyMaxSuccess :: (Int -> Int) -> SpecWith a -> SpecWith a

-- | Use a modified maxDiscardRatio for given spec.
modifyMaxDiscardRatio :: (Int -> Int) -> SpecWith a -> SpecWith a

-- | Use a modified maxSize for given spec.
modifyMaxSize :: (Int -> Int) -> SpecWith a -> SpecWith a

-- | Use a modified maxShrinks for given spec.
modifyMaxShrinks :: (Int -> Int) -> SpecWith a -> SpecWith a

-- | 
--   prop ".." $
--     ..
--   
--   
--   is a shortcut for
--   
--   
--   it ".." $ property $
--     ..
--   
prop :: (HasCallStack, Testable prop) => String -> prop -> Spec
