doctest-parallel-0.2.1: Test interactive Haskell examples
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.DocTest.Internal.Options

Synopsis

Documentation

data Result a Source #

Instances

Instances details
Functor Result Source # 
Instance details

Defined in Test.DocTest.Internal.Options

Methods

fmap :: (a -> b) -> Result a -> Result b #

(<$) :: a -> Result b -> Result a #

Eq a => Eq (Result a) Source # 
Instance details

Defined in Test.DocTest.Internal.Options

Methods

(==) :: Result a -> Result a -> Bool #

(/=) :: Result a -> Result a -> Bool #

Show a => Show (Result a) Source # 
Instance details

Defined in Test.DocTest.Internal.Options

Methods

showsPrec :: Int -> Result a -> ShowS #

show :: Result a -> String #

showList :: [Result a] -> ShowS #

data Config Source #

Constructors

Config 

Fields

Instances

Instances details
Eq Config Source # 
Instance details

Defined in Test.DocTest.Internal.Options

Methods

(==) :: Config -> Config -> Bool #

(/=) :: Config -> Config -> Bool #

Show Config Source # 
Instance details

Defined in Test.DocTest.Internal.Options

parseSeed :: String -> Maybe Int Source #

Parse seed argument

>>> parseSeed "--seed=6"
Just 6
>>> parseSeed "--seeeed=6"
Nothing

parseThreads :: String -> Maybe Int Source #

Parse number of threads argument

>>> parseThreads "-j6"
Just 6
>>> parseThreads "-j-2"
Nothing
>>> parseThreads "-jA"
Nothing

parseSpecificFlag :: String -> String -> Maybe String Source #

Parse a specific flag with a value, or return Nothing

>>> parseSpecificFlag "--foo" "foo"
Nothing
>>> parseSpecificFlag "--foo=" "foo"
Nothing
>>> parseSpecificFlag "--foo=5" "foo"
Just "5"
>>> parseSpecificFlag "--foo=5" "bar"
Nothing

parseFlag :: String -> (String, Maybe String) Source #

Parse a flag into its flag and argument component.

Example:

>>> parseFlag "--optghc=foo"
("--optghc",Just "foo")
>>> parseFlag "--optghc="
("--optghc",Nothing)
>>> parseFlag "--fast"
("--fast",Nothing)