shrun-0.9: A utility program for running shell commands concurrently.
Safe HaskellNone
LanguageGHC2021

Shrun.Configuration.Data.WithDisabled

Synopsis

Documentation

data WithDisabled a Source #

Like Maybe but adds an extra constructor representing a "disabled" state. The idea is that both CLI Args and Toml and have optional fields, but the CLI can also be "disabled", which overrides everything.

The semigroup is similar to Maybe's:

  Disabled <> _ === Disabled === _ <> Disabled

Constructors

With a

The field.

Without

Missing.

Disabled

Disabled.

Instances

Instances details
Foldable WithDisabled Source # 
Instance details

Defined in Shrun.Configuration.Data.WithDisabled

Methods

fold :: Monoid m => WithDisabled m -> m #

foldMap :: Monoid m => (a -> m) -> WithDisabled a -> m #

foldMap' :: Monoid m => (a -> m) -> WithDisabled a -> m #

foldr :: (a -> b -> b) -> b -> WithDisabled a -> b #

foldr' :: (a -> b -> b) -> b -> WithDisabled a -> b #

foldl :: (b -> a -> b) -> b -> WithDisabled a -> b #

foldl' :: (b -> a -> b) -> b -> WithDisabled a -> b #

foldr1 :: (a -> a -> a) -> WithDisabled a -> a #

foldl1 :: (a -> a -> a) -> WithDisabled a -> a #

toList :: WithDisabled a -> [a] #

null :: WithDisabled a -> Bool #

length :: WithDisabled a -> Int #

elem :: Eq a => a -> WithDisabled a -> Bool #

maximum :: Ord a => WithDisabled a -> a #

minimum :: Ord a => WithDisabled a -> a #

sum :: Num a => WithDisabled a -> a #

product :: Num a => WithDisabled a -> a #

Applicative WithDisabled Source # 
Instance details

Defined in Shrun.Configuration.Data.WithDisabled

Functor WithDisabled Source # 
Instance details

Defined in Shrun.Configuration.Data.WithDisabled

Methods

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

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

Monad WithDisabled Source # 
Instance details

Defined in Shrun.Configuration.Data.WithDisabled

Monoid (WithDisabled a) Source # 
Instance details

Defined in Shrun.Configuration.Data.WithDisabled

Semigroup (WithDisabled a) Source # 
Instance details

Defined in Shrun.Configuration.Data.WithDisabled

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

Defined in Shrun.Configuration.Data.WithDisabled

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

Defined in Shrun.Configuration.Data.WithDisabled

Default (WithDisabled a) Source # 
Instance details

Defined in Shrun.Configuration.Data.WithDisabled

Methods

def :: WithDisabled a Source #

Construction

Elimination

fromDefault :: Default a => WithDisabled a -> a Source #

Eliminates WithDisabled via its Default instance.

Misc

(<>?) :: WithDisabled a -> Maybe a -> WithDisabled a infixr 6 Source #

l <>? r lifts Maybe r into a WithDisabled per fromMaybe then runs the Semigroup.

(<>?.) :: Default a => WithDisabled a -> Maybe a -> a infixr 6 Source #

Like (<>?) except we extract a result via fromDefault.

(<>??) :: WithDisabled a -> Maybe a -> Maybe a infixr 6 Source #

Like (<>?) except we extract a Maybe via toMaybe.

Optics