module Test.Tasty.CoreOptions
( NumThreads(..)
, coreOptions
)
where
import Data.Typeable
import Data.Proxy
import Test.Tasty.Options
import Test.Tasty.Options
import Test.Tasty.Patterns
newtype NumThreads = NumThreads { getNumThreads :: Int }
deriving (Eq, Ord, Num, Typeable)
instance IsOption NumThreads where
defaultValue = 1
parseValue = fmap NumThreads . safeRead
optionName = return "num-threads"
optionHelp = return "Number of threads to use for tests execution"
coreOptions :: [OptionDescription]
coreOptions =
[ Option (Proxy :: Proxy NumThreads)
, Option (Proxy :: Proxy TestPattern)
]