language-bash-0.7.1: Parsing and pretty-printing Bash shell scripts

Safe HaskellSafe
LanguageHaskell98

Language.Bash.Cond

Description

Bash conditional commands.

Synopsis

Documentation

data CondExpr a Source #

Bash conditional expressions.

Constructors

Unary UnaryOp a 
Binary a BinaryOp a 
Not (CondExpr a) 
And (CondExpr a) (CondExpr a) 
Or (CondExpr a) (CondExpr a) 
Instances
Functor CondExpr Source # 
Instance details

Defined in Language.Bash.Cond

Methods

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

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

Foldable CondExpr Source # 
Instance details

Defined in Language.Bash.Cond

Methods

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

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

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

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

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

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

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

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

toList :: CondExpr a -> [a] #

null :: CondExpr a -> Bool #

length :: CondExpr a -> Int #

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

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

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

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

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

Traversable CondExpr Source # 
Instance details

Defined in Language.Bash.Cond

Methods

traverse :: Applicative f => (a -> f b) -> CondExpr a -> f (CondExpr b) #

sequenceA :: Applicative f => CondExpr (f a) -> f (CondExpr a) #

mapM :: Monad m => (a -> m b) -> CondExpr a -> m (CondExpr b) #

sequence :: Monad m => CondExpr (m a) -> m (CondExpr a) #

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

Defined in Language.Bash.Cond

Methods

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

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

Data a => Data (CondExpr a) Source # 
Instance details

Defined in Language.Bash.Cond

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CondExpr a -> c (CondExpr a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CondExpr a) #

toConstr :: CondExpr a -> Constr #

dataTypeOf :: CondExpr a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CondExpr a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CondExpr a)) #

gmapT :: (forall b. Data b => b -> b) -> CondExpr a -> CondExpr a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CondExpr a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CondExpr a -> r #

gmapQ :: (forall d. Data d => d -> u) -> CondExpr a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CondExpr a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CondExpr a -> m (CondExpr a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CondExpr a -> m (CondExpr a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CondExpr a -> m (CondExpr a) #

Read a => Read (CondExpr a) Source # 
Instance details

Defined in Language.Bash.Cond

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

Defined in Language.Bash.Cond

Methods

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

show :: CondExpr a -> String #

showList :: [CondExpr a] -> ShowS #

Pretty a => Pretty (CondExpr a) Source # 
Instance details

Defined in Language.Bash.Cond

data UnaryOp Source #

Unary conditional operators.

Instances
Bounded UnaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Enum UnaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Eq UnaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Methods

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

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

Data UnaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UnaryOp -> c UnaryOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UnaryOp #

toConstr :: UnaryOp -> Constr #

dataTypeOf :: UnaryOp -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UnaryOp) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UnaryOp) #

gmapT :: (forall b. Data b => b -> b) -> UnaryOp -> UnaryOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UnaryOp -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UnaryOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> UnaryOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UnaryOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UnaryOp -> m UnaryOp #

Ord UnaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Read UnaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Show UnaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Pretty UnaryOp Source # 
Instance details

Defined in Language.Bash.Cond

data BinaryOp Source #

Binary conditional operators.

Instances
Bounded BinaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Enum BinaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Eq BinaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Data BinaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BinaryOp -> c BinaryOp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BinaryOp #

toConstr :: BinaryOp -> Constr #

dataTypeOf :: BinaryOp -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BinaryOp) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinaryOp) #

gmapT :: (forall b. Data b => b -> b) -> BinaryOp -> BinaryOp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BinaryOp -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BinaryOp -> r #

gmapQ :: (forall d. Data d => d -> u) -> BinaryOp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BinaryOp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BinaryOp -> m BinaryOp #

Ord BinaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Read BinaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Show BinaryOp Source # 
Instance details

Defined in Language.Bash.Cond

Pretty BinaryOp Source # 
Instance details

Defined in Language.Bash.Cond

parseTestExpr :: [String] -> Either ParseError (CondExpr String) Source #

Parse a conditional expression for the Bash test builtin.