{-# LANGUAGE RankNTypes #-} module Test.Hspec.Core.Format ( Format(..) , Progress , Path , Location(..) , Seconds(..) , Item(..) , Result(..) , FailureReason(..) ) where import Test.Hspec.Core.Spec (Progress, Location(..)) import Test.Hspec.Core.Example (FailureReason(..)) import Test.Hspec.Core.Util (Path) import Test.Hspec.Core.Clock data Item = Item { Item -> Maybe Location itemLocation :: Maybe Location , Item -> Seconds itemDuration :: Seconds , Item -> String itemInfo :: String , Item -> Result itemResult :: Result } data Result = Success | Pending (Maybe String) | Failure FailureReason data Format m = Format { Format m -> forall a. m a -> IO a formatRun :: forall a. m a -> IO a , Format m -> Path -> m () formatGroupStarted :: Path -> m () , Format m -> Path -> m () formatGroupDone :: Path -> m () , Format m -> Path -> Progress -> m () formatProgress :: Path -> Progress -> m () , Format m -> Path -> Item -> m () formatItem :: Path -> Item -> m () }