Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Shell script types.
Synopsis
- data Command = Command ShellCommand [Redir]
- data ShellCommand
- = SimpleCommand [Assign] [Word]
- | AssignBuiltin Word [Either Assign Word]
- | FunctionDef String List
- | Coproc String Command
- | Subshell List
- | Group List
- | Arith String
- | Cond (CondExpr Word)
- | For String WordList List
- | ArithFor String List
- | Select String WordList List
- | Case Word [CaseClause]
- | If List List (Maybe List)
- | Until List List
- | While List List
- data WordList
- data CaseClause = CaseClause [Word] List CaseTerm
- data CaseTerm
- = Break
- | FallThrough
- | Continue
- data Redir
- data IODesc
- data RedirOp
- data HeredocOp
- newtype List = List [Statement]
- data Statement = Statement AndOr ListTerm
- data ListTerm
- data AndOr
- data Pipeline = Pipeline {}
- data Assign = Assign Parameter AssignOp RValue
- data AssignOp
- = Equals
- | PlusEquals
- data RValue
Commands
A Bash command with redirections.
Instances
Eq Command Source # | |
Data Command Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Command -> c Command # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Command # toConstr :: Command -> Constr # dataTypeOf :: Command -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Command) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Command) # gmapT :: (forall b. Data b => b -> b) -> Command -> Command # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Command -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Command -> r # gmapQ :: (forall d. Data d => d -> u) -> Command -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Command -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Command -> m Command # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Command -> m Command # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Command -> m Command # | |
Read Command Source # | |
Show Command Source # | |
Pretty Command Source # | |
data ShellCommand Source #
A Bash command.
SimpleCommand [Assign] [Word] | A simple command consisting of assignments followed by words. |
AssignBuiltin Word [Either Assign Word] | The shell builtins |
FunctionDef String List | A function name and definition. |
Coproc String Command | A named coprocess. |
Subshell List | A |
Group List | A |
Arith String | An arithmetic expression. |
Cond (CondExpr Word) | A Bash |
For String WordList List | A |
ArithFor String List | An arithmetic |
Select String WordList List | A |
Case Word [CaseClause] | A |
If List List (Maybe List) | An |
Until List List | An |
While List List | A |
Instances
A word list or "$@"
.
Instances
Eq WordList Source # | |
Data WordList Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WordList -> c WordList # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WordList # toConstr :: WordList -> Constr # dataTypeOf :: WordList -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WordList) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WordList) # gmapT :: (forall b. Data b => b -> b) -> WordList -> WordList # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WordList -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WordList -> r # gmapQ :: (forall d. Data d => d -> u) -> WordList -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WordList -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WordList -> m WordList # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WordList -> m WordList # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WordList -> m WordList # | |
Read WordList Source # | |
Show WordList Source # | |
Pretty WordList Source # | |
data CaseClause Source #
A single case clause.
Instances
A case clause terminator.
Break | ;; |
FallThrough | ;& |
Continue | ;;& |
Instances
Bounded CaseTerm Source # | |
Enum CaseTerm Source # | |
Eq CaseTerm Source # | |
Data CaseTerm Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CaseTerm -> c CaseTerm # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CaseTerm # toConstr :: CaseTerm -> Constr # dataTypeOf :: CaseTerm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CaseTerm) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CaseTerm) # gmapT :: (forall b. Data b => b -> b) -> CaseTerm -> CaseTerm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CaseTerm -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CaseTerm -> r # gmapQ :: (forall d. Data d => d -> u) -> CaseTerm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CaseTerm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CaseTerm -> m CaseTerm # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CaseTerm -> m CaseTerm # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CaseTerm -> m CaseTerm # | |
Ord CaseTerm Source # | |
Defined in Language.Bash.Syntax | |
Read CaseTerm Source # | |
Show CaseTerm Source # | |
Pretty CaseTerm Source # | |
Redirections
A redirection.
Redir | A redirection. |
Heredoc | A here document. |
|
Instances
Eq Redir Source # | |
Data Redir Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Redir -> c Redir # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Redir # dataTypeOf :: Redir -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Redir) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Redir) # gmapT :: (forall b. Data b => b -> b) -> Redir -> Redir # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Redir -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Redir -> r # gmapQ :: (forall d. Data d => d -> u) -> Redir -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Redir -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Redir -> m Redir # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Redir -> m Redir # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Redir -> m Redir # | |
Read Redir Source # | |
Show Redir Source # | |
Pretty Redir Source # | |
A redirection file descriptor.
IONumber Int | A file descriptor number. |
IOVar String | A variable |
Instances
Eq IODesc Source # | |
Data IODesc Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IODesc -> c IODesc # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IODesc # toConstr :: IODesc -> Constr # dataTypeOf :: IODesc -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IODesc) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IODesc) # gmapT :: (forall b. Data b => b -> b) -> IODesc -> IODesc # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IODesc -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IODesc -> r # gmapQ :: (forall d. Data d => d -> u) -> IODesc -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IODesc -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IODesc -> m IODesc # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IODesc -> m IODesc # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IODesc -> m IODesc # | |
Read IODesc Source # | |
Show IODesc Source # | |
Pretty IODesc Source # | |
A redirection operator.
Instances
Bounded RedirOp Source # | |
Enum RedirOp Source # | |
Eq RedirOp Source # | |
Data RedirOp Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RedirOp -> c RedirOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RedirOp # toConstr :: RedirOp -> Constr # dataTypeOf :: RedirOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RedirOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RedirOp) # gmapT :: (forall b. Data b => b -> b) -> RedirOp -> RedirOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RedirOp -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RedirOp -> r # gmapQ :: (forall d. Data d => d -> u) -> RedirOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RedirOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RedirOp -> m RedirOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RedirOp -> m RedirOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RedirOp -> m RedirOp # | |
Ord RedirOp Source # | |
Read RedirOp Source # | |
Show RedirOp Source # | |
Pretty RedirOp Source # | |
A here document operator.
Instances
Lists
A compound list of statements.
Instances
Eq List Source # | |
Data List Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> List -> c List # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c List # dataTypeOf :: List -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c List) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c List) # gmapT :: (forall b. Data b => b -> b) -> List -> List # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> List -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> List -> r # gmapQ :: (forall d. Data d => d -> u) -> List -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> List -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> List -> m List # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> List -> m List # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> List -> m List # | |
Read List Source # | |
Show List Source # | |
Pretty List Source # | |
A single statement in a list.
Instances
Eq Statement Source # | |
Data Statement Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Statement -> c Statement # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Statement # toConstr :: Statement -> Constr # dataTypeOf :: Statement -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Statement) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Statement) # gmapT :: (forall b. Data b => b -> b) -> Statement -> Statement # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Statement -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Statement -> r # gmapQ :: (forall d. Data d => d -> u) -> Statement -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Statement -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Statement -> m Statement # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Statement -> m Statement # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Statement -> m Statement # | |
Read Statement Source # | |
Show Statement Source # | |
Pretty Statement Source # | |
A statement terminator.
Instances
Bounded ListTerm Source # | |
Enum ListTerm Source # | |
Eq ListTerm Source # | |
Data ListTerm Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ListTerm -> c ListTerm # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ListTerm # toConstr :: ListTerm -> Constr # dataTypeOf :: ListTerm -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ListTerm) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ListTerm) # gmapT :: (forall b. Data b => b -> b) -> ListTerm -> ListTerm # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ListTerm -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ListTerm -> r # gmapQ :: (forall d. Data d => d -> u) -> ListTerm -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ListTerm -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ListTerm -> m ListTerm # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ListTerm -> m ListTerm # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ListTerm -> m ListTerm # | |
Ord ListTerm Source # | |
Defined in Language.Bash.Syntax | |
Read ListTerm Source # | |
Show ListTerm Source # | |
Pretty ListTerm Source # | |
A right-associative list of pipelines.
Last Pipeline | The last pipeline of a list. |
And Pipeline AndOr | A |
Or Pipeline AndOr | A |
Instances
Eq AndOr Source # | |
Data AndOr Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AndOr -> c AndOr # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AndOr # dataTypeOf :: AndOr -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AndOr) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AndOr) # gmapT :: (forall b. Data b => b -> b) -> AndOr -> AndOr # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AndOr -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AndOr -> r # gmapQ :: (forall d. Data d => d -> u) -> AndOr -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AndOr -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AndOr -> m AndOr # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AndOr -> m AndOr # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AndOr -> m AndOr # | |
Read AndOr Source # | |
Show AndOr Source # | |
Pretty AndOr Source # | |
A (possibly timed or inverted) pipeline, linked with |
or |&
.
Pipeline | |
|
Instances
Eq Pipeline Source # | |
Data Pipeline Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pipeline -> c Pipeline # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pipeline # toConstr :: Pipeline -> Constr # dataTypeOf :: Pipeline -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pipeline) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pipeline) # gmapT :: (forall b. Data b => b -> b) -> Pipeline -> Pipeline # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pipeline -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pipeline -> r # gmapQ :: (forall d. Data d => d -> u) -> Pipeline -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pipeline -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pipeline -> m Pipeline # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pipeline -> m Pipeline # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pipeline -> m Pipeline # | |
Read Pipeline Source # | |
Show Pipeline Source # | |
Pretty Pipeline Source # | |
Assignments
An assignment.
Instances
Eq Assign Source # | |
Data Assign Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Assign -> c Assign # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Assign # toConstr :: Assign -> Constr # dataTypeOf :: Assign -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Assign) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Assign) # gmapT :: (forall b. Data b => b -> b) -> Assign -> Assign # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Assign -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Assign -> r # gmapQ :: (forall d. Data d => d -> u) -> Assign -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Assign -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Assign -> m Assign # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Assign -> m Assign # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Assign -> m Assign # | |
Read Assign Source # | |
Show Assign Source # | |
Pretty Assign Source # | |
An assignment operator.
Instances
Bounded AssignOp Source # | |
Enum AssignOp Source # | |
Eq AssignOp Source # | |
Data AssignOp Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AssignOp -> c AssignOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AssignOp # toConstr :: AssignOp -> Constr # dataTypeOf :: AssignOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AssignOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AssignOp) # gmapT :: (forall b. Data b => b -> b) -> AssignOp -> AssignOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AssignOp -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AssignOp -> r # gmapQ :: (forall d. Data d => d -> u) -> AssignOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AssignOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AssignOp -> m AssignOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AssignOp -> m AssignOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AssignOp -> m AssignOp # | |
Ord AssignOp Source # | |
Defined in Language.Bash.Syntax | |
Read AssignOp Source # | |
Show AssignOp Source # | |
Pretty AssignOp Source # | |
The right side of an assignment.
RValue Word | A simple word. |
RArray [(Maybe Word, Word)] | An array assignment, as |
Instances
Eq RValue Source # | |
Data RValue Source # | |
Defined in Language.Bash.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RValue -> c RValue # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RValue # toConstr :: RValue -> Constr # dataTypeOf :: RValue -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RValue) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RValue) # gmapT :: (forall b. Data b => b -> b) -> RValue -> RValue # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RValue -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RValue -> r # gmapQ :: (forall d. Data d => d -> u) -> RValue -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RValue -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RValue -> m RValue # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RValue -> m RValue # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RValue -> m RValue # | |
Read RValue Source # | |
Show RValue Source # | |
Pretty RValue Source # | |