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

-- | Catchy combinators for HUnit
--   
--   Catchy combinators for HUnit:
--   https://github.com/hspec/hspec-expectations#readme
@package hspec-expectations
@version 0.8.2

-- | Experimental combinators, that may become part of the main
--   distribution, if they turn out to be useful for a wider audience.
module Test.Hspec.Expectations.Contrib
isLeft :: Either a b -> Bool
isRight :: Either a b -> Bool

-- | Introductory documentation:
--   https://github.com/sol/hspec-expectations#readme
module Test.Hspec.Expectations
type Expectation = Assertion
expectationFailure :: HasCallStack => String -> Expectation

-- | actual `shouldBe` expected sets the expectation that
--   actual is equal to expected.
shouldBe :: (HasCallStack, Show a, Eq a) => a -> a -> Expectation
infix 1 `shouldBe`

-- | v `shouldSatisfy` p sets the expectation that p v is
--   True.
shouldSatisfy :: (HasCallStack, Show a) => a -> (a -> Bool) -> Expectation
infix 1 `shouldSatisfy`

-- | list `shouldStartWith` prefix sets the expectation that
--   list starts with prefix,
shouldStartWith :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation
infix 1 `shouldStartWith`

-- | list `shouldEndWith` suffix sets the expectation that
--   list ends with suffix,
shouldEndWith :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation
infix 1 `shouldEndWith`

-- | list `shouldContain` sublist sets the expectation that
--   sublist is contained, wholly and intact, anywhere in
--   list.
shouldContain :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation
infix 1 `shouldContain`

-- | xs `shouldMatchList` ys sets the expectation that xs
--   has the same elements that ys has, possibly in another order
shouldMatchList :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation
infix 1 `shouldMatchList`

-- | action `shouldReturn` expected sets the expectation that
--   action returns expected.
shouldReturn :: (HasCallStack, Show a, Eq a) => IO a -> a -> Expectation
infix 1 `shouldReturn`

-- | actual `shouldNotBe` notExpected sets the expectation that
--   actual is not equal to notExpected
shouldNotBe :: (HasCallStack, Show a, Eq a) => a -> a -> Expectation
infix 1 `shouldNotBe`

-- | v `shouldNotSatisfy` p sets the expectation that p v
--   is False.
shouldNotSatisfy :: (HasCallStack, Show a) => a -> (a -> Bool) -> Expectation
infix 1 `shouldNotSatisfy`

-- | list `shouldNotContain` sublist sets the expectation that
--   sublist is not contained anywhere in list.
shouldNotContain :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation
infix 1 `shouldNotContain`

-- | action `shouldNotReturn` notExpected sets the expectation
--   that action does not return notExpected.
shouldNotReturn :: (HasCallStack, Show a, Eq a) => IO a -> a -> Expectation
infix 1 `shouldNotReturn`

-- | action `shouldThrow` selector sets the expectation that
--   action throws an exception. The precise nature of the
--   expected exception is described with a Selector.
shouldThrow :: (HasCallStack, Exception e) => IO a -> Selector e -> Expectation
infix 1 `shouldThrow`

-- | A Selector is a predicate; it can simultaneously constrain
--   the type and value of an exception.
type Selector a = (a -> Bool)
anyException :: Selector SomeException
anyErrorCall :: Selector ErrorCall
anyIOException :: Selector IOException
anyArithException :: Selector ArithException
errorCall :: String -> Selector ErrorCall
type HasCallStack = ?callStack :: CallStack
