Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Bash conditional commands.
Synopsis
- data CondExpr a
- data UnaryOp
- data BinaryOp
- parseTestExpr :: [String] -> Either ParseError (CondExpr String)
Documentation
Bash conditional expressions.
Unary UnaryOp a | |
Binary a BinaryOp a | |
Not (CondExpr a) | |
And (CondExpr a) (CondExpr a) | |
Or (CondExpr a) (CondExpr a) |
Instances
Functor CondExpr Source # | |
Foldable CondExpr Source # | |
Defined in Language.Bash.Cond 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 # elem :: Eq a => a -> CondExpr a -> Bool # maximum :: Ord a => CondExpr a -> a # minimum :: Ord a => CondExpr a -> a # | |
Traversable CondExpr Source # | |
Eq a => Eq (CondExpr a) Source # | |
Data a => Data (CondExpr a) Source # | |
Defined in Language.Bash.Cond 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 # | |
Show a => Show (CondExpr a) Source # | |
Pretty a => Pretty (CondExpr a) Source # | |
Unary conditional operators.
BlockFile | -b |
CharacterFile | -c |
Directory | -d |
FileExists |
|
RegularFile | -f |
SetGID | -g |
Sticky | -k |
NamedPipe | -p |
Readable | -r |
FileSize | -s |
Terminal | -t |
SetUID | -u |
Writable | -w |
Executable | -x |
GroupOwned | -G |
SymbolicLink |
|
Modified | -N |
UserOwned | -O |
Socket | -S |
Optname | -o |
Varname | -v |
ZeroString | -z |
NonzeroString |
|
Instances
Bounded UnaryOp Source # | |
Enum UnaryOp Source # | |
Eq UnaryOp Source # | |
Data UnaryOp Source # | |
Defined in Language.Bash.Cond 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 # | |
Read UnaryOp Source # | |
Show UnaryOp Source # | |
Pretty UnaryOp Source # | |
Binary conditional operators.
SameFile | -ef |
NewerThan | -nt |
OlderThan | -ot |
StrMatch | =~ |
StrEQ |
|
StrNE | != |
StrLT | < |
StrGT | > |
ArithEQ | -eq |
ArithNE | -ne |
ArithLT | -lt |
ArithLE | -le |
ArithGT | -gt |
ArithGE | -ge |
Instances
Bounded BinaryOp Source # | |
Enum BinaryOp Source # | |
Eq BinaryOp Source # | |
Data BinaryOp Source # | |
Defined in Language.Bash.Cond 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 # | |
Defined in Language.Bash.Cond | |
Read BinaryOp Source # | |
Show BinaryOp Source # | |
Pretty BinaryOp Source # | |
parseTestExpr :: [String] -> Either ParseError (CondExpr String) Source #
Parse a conditional expression for the Bash test
builtin.