papa-0.7.0: test/Main.hs
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -Wall #-}
-- | The Hedgehog properties of Papa, and the check that its modules import
-- together.
module Main (
main,
) where
import Composes (composes)
import ComposesUnsafe (composesUnsafe)
import Deny (denied)
import Hedgehog (Group, checkParallel, checkSequential)
import Papa
import Properties (properties)
import PropertiesAsync (propertiesAsync)
import PropertiesContainers (propertiesContainers)
import PropertiesFS (propertiesCurrentDirectory, propertiesFS)
import PropertiesIO (propertiesIO)
import PropertiesNumeric (propertiesNumeric)
import PropertiesText (propertiesText)
import PropertiesVector (propertiesVector)
import Totals (totals)
main :: IO ()
main = do
printed <- runExceptT (for_ (composes <> composesUnsafe <> totals <> [show (length denied) <> " names are not exported by Papa"]) (putStrLn . pack))
passed <- traverse checkParallel groups
passedSequentially <- checkSequential propertiesCurrentDirectory
bool exitFailure exitSuccess (isRight printed && and passed && passedSequentially)
-- | The property groups, one for each area of Papa.
groups :: [Group]
groups =
[ properties
, propertiesIO
, propertiesVector
, propertiesNumeric
, propertiesContainers
, propertiesText
, propertiesFS
, propertiesAsync
]