-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Parsing and pretty-printing Bash shell scripts -- -- A library for parsing, pretty-printing, and manipulating Bash shell -- scripts. @package language-bash @version 0.7.0 -- | Pretty-printing of Bash scripts. This tries to stay close to the -- format used by the Bash builtin declare -f. module Language.Bash.Pretty -- | A class of types which may be pretty-printed. class Pretty a where prettyList = hsep . map pretty -- | Pretty-print to a Doc. pretty :: Pretty a => a -> Doc -- | Pretty-print a list. By default, this separates each element with a -- space using hsep. prettyList :: Pretty a => [a] -> Doc -- | Pretty-print to a String. prettyText :: Pretty a => a -> String instance Language.Bash.Pretty.Pretty a => Language.Bash.Pretty.Pretty [a] instance Language.Bash.Pretty.Pretty Text.PrettyPrint.HughesPJ.Doc instance Language.Bash.Pretty.Pretty GHC.Types.Char instance Language.Bash.Pretty.Pretty a => Language.Bash.Pretty.Pretty (GHC.Base.Maybe a) instance (Language.Bash.Pretty.Pretty a, Language.Bash.Pretty.Pretty b) => Language.Bash.Pretty.Pretty (Data.Either.Either a b) -- | Bash words and substitutions. module Language.Bash.Word -- | A Bash word, broken up into logical spans. type Word = [Span] -- | An individual unit of a word. data Span -- | A normal character. Char :: Char -> Span -- | An escaped character. Escape :: Char -> Span -- | A single-quoted string. Single :: Word -> Span -- | A double-quoted string. Double :: Word -> Span -- | A ANSI C string. ANSIC :: Word -> Span -- | A locale-translated string. Locale :: Word -> Span -- | A backquote-style command substitution. To extract the command string, -- unquote the word inside. Backquote :: Word -> Span -- | A parameter substitution. ParamSubst :: ParamSubst -> Span -- | An arithmetic substitution. ArithSubst :: String -> Span -- | A command substitution. CommandSubst :: String -> Span -- | A process substitution. ProcessSubst :: ProcessSubstOp -> String -> Span -- | A parameter name an optional subscript. data Parameter Parameter :: String -> (Maybe Word) -> Parameter -- | A parameter substitution. data ParamSubst Bare :: Parameter -> ParamSubst -- | The parameter to substitute. [parameter] :: ParamSubst -> Parameter Brace :: Bool -> Parameter -> ParamSubst -- | Use indirect expansion. [indirect] :: ParamSubst -> Bool -- | The parameter to substitute. [parameter] :: ParamSubst -> Parameter Alt :: Bool -> Parameter -> Bool -> AltOp -> Word -> ParamSubst -- | Use indirect expansion. [indirect] :: ParamSubst -> Bool -- | The parameter to substitute. [parameter] :: ParamSubst -> Parameter -- | Test for both existence and null values. [testNull] :: ParamSubst -> Bool -- | The operator. [altOp] :: ParamSubst -> AltOp -- | The alternate word. [altWord] :: ParamSubst -> Word Substring :: Bool -> Parameter -> Word -> Word -> ParamSubst -- | Use indirect expansion. [indirect] :: ParamSubst -> Bool -- | The parameter to substitute. [parameter] :: ParamSubst -> Parameter -- | The substring offset. [subOffset] :: ParamSubst -> Word -- | The substring length, if any. [subLength] :: ParamSubst -> Word Prefix :: String -> Char -> ParamSubst -- | The variable prefix. [prefix] :: ParamSubst -> String -- | Either @ of *. [modifier] :: ParamSubst -> Char Indices :: Parameter -> ParamSubst -- | The parameter to substitute. [parameter] :: ParamSubst -> Parameter Length :: Parameter -> ParamSubst -- | The parameter to substitute. [parameter] :: ParamSubst -> Parameter Delete :: Bool -> Parameter -> Bool -> Direction -> Word -> ParamSubst -- | Use indirect expansion. [indirect] :: ParamSubst -> Bool -- | The parameter to substitute. [parameter] :: ParamSubst -> Parameter -- | Replace the longest match instead of the shortest match. [longest] :: ParamSubst -> Bool -- | Where to delete from. [deleteDirection] :: ParamSubst -> Direction -- | The replacement pattern. [pattern] :: ParamSubst -> Word Replace :: Bool -> Parameter -> Bool -> Maybe Direction -> Word -> Word -> ParamSubst -- | Use indirect expansion. [indirect] :: ParamSubst -> Bool -- | The parameter to substitute. [parameter] :: ParamSubst -> Parameter -- | Replace all occurences. [replaceAll] :: ParamSubst -> Bool -- | Where to replace. [replaceDirection] :: ParamSubst -> Maybe Direction -- | The replacement pattern. [pattern] :: ParamSubst -> Word -- | The replacement string. [replacement] :: ParamSubst -> Word LetterCase :: Bool -> Parameter -> LetterCaseOp -> Bool -> Word -> ParamSubst -- | Use indirect expansion. [indirect] :: ParamSubst -> Bool -- | The parameter to substitute. [parameter] :: ParamSubst -> Parameter -- | Convert to lowercase, not uppercase. [letterCaseOp] :: ParamSubst -> LetterCaseOp -- | Convert all characters, not only the starts of words. [convertAll] :: ParamSubst -> Bool -- | The replacement pattern. [pattern] :: ParamSubst -> Word -- | An alternation operator. data AltOp -- | -, :- AltDefault :: AltOp -- | '=', := AltAssign :: AltOp -- | ?, :? AltError :: AltOp -- | +, :+ AltReplace :: AltOp -- | A letter case operator. data LetterCaseOp ToLower :: LetterCaseOp ToUpper :: LetterCaseOp -- | A string direction. data Direction Front :: Direction Back :: Direction -- | A process substitution. data ProcessSubstOp -- |
--   <
--   
ProcessIn :: ProcessSubstOp -- |
--   >
--   
ProcessOut :: ProcessSubstOp -- | Convert a string to an unquoted word. stringToWord :: String -> Word -- | Remove all quoting characters from a word. unquote :: Word -> String instance GHC.Show.Show Language.Bash.Word.Parameter instance GHC.Read.Read Language.Bash.Word.Parameter instance GHC.Classes.Eq Language.Bash.Word.Parameter instance Data.Data.Data Language.Bash.Word.Parameter instance GHC.Show.Show Language.Bash.Word.ParamSubst instance GHC.Read.Read Language.Bash.Word.ParamSubst instance GHC.Classes.Eq Language.Bash.Word.ParamSubst instance Data.Data.Data Language.Bash.Word.ParamSubst instance GHC.Show.Show Language.Bash.Word.Span instance GHC.Read.Read Language.Bash.Word.Span instance GHC.Classes.Eq Language.Bash.Word.Span instance Data.Data.Data Language.Bash.Word.Span instance GHC.Enum.Bounded Language.Bash.Word.ProcessSubstOp instance GHC.Enum.Enum Language.Bash.Word.ProcessSubstOp instance GHC.Show.Show Language.Bash.Word.ProcessSubstOp instance GHC.Read.Read Language.Bash.Word.ProcessSubstOp instance GHC.Classes.Ord Language.Bash.Word.ProcessSubstOp instance GHC.Classes.Eq Language.Bash.Word.ProcessSubstOp instance Data.Data.Data Language.Bash.Word.ProcessSubstOp instance GHC.Enum.Bounded Language.Bash.Word.Direction instance GHC.Enum.Enum Language.Bash.Word.Direction instance GHC.Show.Show Language.Bash.Word.Direction instance GHC.Read.Read Language.Bash.Word.Direction instance GHC.Classes.Ord Language.Bash.Word.Direction instance GHC.Classes.Eq Language.Bash.Word.Direction instance Data.Data.Data Language.Bash.Word.Direction instance GHC.Enum.Bounded Language.Bash.Word.LetterCaseOp instance GHC.Enum.Enum Language.Bash.Word.LetterCaseOp instance GHC.Show.Show Language.Bash.Word.LetterCaseOp instance GHC.Read.Read Language.Bash.Word.LetterCaseOp instance GHC.Classes.Ord Language.Bash.Word.LetterCaseOp instance GHC.Classes.Eq Language.Bash.Word.LetterCaseOp instance Data.Data.Data Language.Bash.Word.LetterCaseOp instance GHC.Enum.Bounded Language.Bash.Word.AltOp instance GHC.Enum.Enum Language.Bash.Word.AltOp instance GHC.Show.Show Language.Bash.Word.AltOp instance GHC.Read.Read Language.Bash.Word.AltOp instance GHC.Classes.Ord Language.Bash.Word.AltOp instance GHC.Classes.Eq Language.Bash.Word.AltOp instance Data.Data.Data Language.Bash.Word.AltOp instance Language.Bash.Pretty.Pretty Language.Bash.Word.Span instance Language.Bash.Pretty.Pretty Language.Bash.Word.Parameter instance Language.Bash.Pretty.Pretty Language.Bash.Word.ParamSubst instance Language.Bash.Operator.Operator Language.Bash.Word.AltOp instance Language.Bash.Pretty.Pretty Language.Bash.Word.AltOp instance Language.Bash.Operator.Operator Language.Bash.Word.LetterCaseOp instance Language.Bash.Pretty.Pretty Language.Bash.Word.LetterCaseOp instance Language.Bash.Pretty.Pretty Language.Bash.Word.Direction instance Language.Bash.Operator.Operator Language.Bash.Word.ProcessSubstOp instance Language.Bash.Pretty.Pretty Language.Bash.Word.ProcessSubstOp -- | Shell expansions. module Language.Bash.Expand -- | Brace expand a word. braceExpand :: Word -> [Word] -- | A tilde prefix. data TildePrefix -- |
--   ~/foo
--   
Home :: TildePrefix -- |
--   ~fred/foo
--   
UserHome :: String -> TildePrefix -- |
--   ~+/foo
--   
PWD :: TildePrefix -- |
--   ~-/foo
--   
OldPWD :: TildePrefix -- | ~N, ~+N, ~-N Dirs :: Int -> TildePrefix -- | Strip the tilde prefix of a word, if any. tildePrefix :: Word -> Maybe (TildePrefix, Word) -- | Split a word on delimiters. splitWord :: [Char] -> Word -> [Word] instance GHC.Show.Show Language.Bash.Expand.TildePrefix instance GHC.Read.Read Language.Bash.Expand.TildePrefix instance GHC.Classes.Eq Language.Bash.Expand.TildePrefix instance Language.Bash.Pretty.Pretty Language.Bash.Expand.TildePrefix -- | Bash conditional commands. module Language.Bash.Cond -- | Bash conditional expressions. data CondExpr a Unary :: UnaryOp -> a -> CondExpr a Binary :: a -> BinaryOp -> a -> CondExpr a Not :: (CondExpr a) -> CondExpr a And :: (CondExpr a) -> (CondExpr a) -> CondExpr a Or :: (CondExpr a) -> (CondExpr a) -> CondExpr a -- | Unary conditional operators. data UnaryOp -- |
--   -b
--   
BlockFile :: UnaryOp -- |
--   -c
--   
CharacterFile :: UnaryOp -- |
--   -d
--   
Directory :: UnaryOp -- | -e, -a FileExists :: UnaryOp -- |
--   -f
--   
RegularFile :: UnaryOp -- |
--   -g
--   
SetGID :: UnaryOp -- |
--   -k
--   
Sticky :: UnaryOp -- |
--   -p
--   
NamedPipe :: UnaryOp -- |
--   -r
--   
Readable :: UnaryOp -- |
--   -s
--   
FileSize :: UnaryOp -- |
--   -t
--   
Terminal :: UnaryOp -- |
--   -u
--   
SetUID :: UnaryOp -- |
--   -w
--   
Writable :: UnaryOp -- |
--   -x
--   
Executable :: UnaryOp -- |
--   -G
--   
GroupOwned :: UnaryOp -- | -L, -h SymbolicLink :: UnaryOp -- |
--   -N
--   
Modified :: UnaryOp -- |
--   -O
--   
UserOwned :: UnaryOp -- |
--   -S
--   
Socket :: UnaryOp -- |
--   -o
--   
Optname :: UnaryOp -- |
--   -v
--   
Varname :: UnaryOp -- |
--   -z
--   
ZeroString :: UnaryOp -- | -n string or string NonzeroString :: UnaryOp -- | Binary conditional operators. data BinaryOp -- |
--   -ef
--   
SameFile :: BinaryOp -- |
--   -nt
--   
NewerThan :: BinaryOp -- |
--   -ot
--   
OlderThan :: BinaryOp -- |
--   =~
--   
StrMatch :: BinaryOp -- | ==, = StrEQ :: BinaryOp -- |
--   !=
--   
StrNE :: BinaryOp -- |
--   <
--   
StrLT :: BinaryOp -- |
--   >
--   
StrGT :: BinaryOp -- |
--   -eq
--   
ArithEQ :: BinaryOp -- |
--   -ne
--   
ArithNE :: BinaryOp -- |
--   -lt
--   
ArithLT :: BinaryOp -- |
--   -le
--   
ArithLE :: BinaryOp -- |
--   -gt
--   
ArithGT :: BinaryOp -- |
--   -ge
--   
ArithGE :: BinaryOp -- | Parse a conditional expression for the Bash test builtin. parseTestExpr :: [String] -> Either ParseError (CondExpr String) instance Data.Traversable.Traversable Language.Bash.Cond.CondExpr instance Data.Foldable.Foldable Language.Bash.Cond.CondExpr instance GHC.Base.Functor Language.Bash.Cond.CondExpr instance GHC.Show.Show a => GHC.Show.Show (Language.Bash.Cond.CondExpr a) instance GHC.Read.Read a => GHC.Read.Read (Language.Bash.Cond.CondExpr a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Language.Bash.Cond.CondExpr a) instance Data.Data.Data a => Data.Data.Data (Language.Bash.Cond.CondExpr a) instance GHC.Enum.Bounded Language.Bash.Cond.BinaryOp instance GHC.Enum.Enum Language.Bash.Cond.BinaryOp instance GHC.Show.Show Language.Bash.Cond.BinaryOp instance GHC.Read.Read Language.Bash.Cond.BinaryOp instance GHC.Classes.Ord Language.Bash.Cond.BinaryOp instance GHC.Classes.Eq Language.Bash.Cond.BinaryOp instance Data.Data.Data Language.Bash.Cond.BinaryOp instance GHC.Enum.Bounded Language.Bash.Cond.UnaryOp instance GHC.Enum.Enum Language.Bash.Cond.UnaryOp instance GHC.Show.Show Language.Bash.Cond.UnaryOp instance GHC.Read.Read Language.Bash.Cond.UnaryOp instance GHC.Classes.Ord Language.Bash.Cond.UnaryOp instance GHC.Classes.Eq Language.Bash.Cond.UnaryOp instance Data.Data.Data Language.Bash.Cond.UnaryOp instance Language.Bash.Pretty.Pretty a => Language.Bash.Pretty.Pretty (Language.Bash.Cond.CondExpr a) instance Language.Bash.Operator.Operator Language.Bash.Cond.UnaryOp instance Language.Bash.Pretty.Pretty Language.Bash.Cond.UnaryOp instance Language.Bash.Operator.Operator Language.Bash.Cond.BinaryOp instance Language.Bash.Pretty.Pretty Language.Bash.Cond.BinaryOp -- | Shell script types. module Language.Bash.Syntax -- | A Bash command with redirections. data Command Command :: ShellCommand -> [Redir] -> Command -- | A Bash command. data ShellCommand -- | A simple command consisting of assignments followed by words. SimpleCommand :: [Assign] -> [Word] -> ShellCommand -- | The shell builtins declare, eval, export, -- local, readonly, and typeset can accept -- both assignments and words as arguments. AssignBuiltin :: Word -> [Either Assign Word] -> ShellCommand -- | A function name and definition. FunctionDef :: String -> List -> ShellCommand -- | A named coprocess. Coproc :: String -> Command -> ShellCommand -- | A (...) list, denoting a subshell. Subshell :: List -> ShellCommand -- | A {...} list. Group :: List -> ShellCommand -- | An arithmetic expression. Arith :: String -> ShellCommand -- | A Bash [[...]] conditional expression. Cond :: (CondExpr Word) -> ShellCommand -- | A for name in words command. If in -- words is absent, the word list defaults to "$@". For :: String -> WordList -> List -> ShellCommand -- | An arithmetic for ((...)) command. ArithFor :: String -> List -> ShellCommand -- | A select name in words command. If in -- words is absent, the word list defaults to "$@". Select :: String -> WordList -> List -> ShellCommand -- | A case command. Case :: Word -> [CaseClause] -> ShellCommand -- | An if command, with a predicate, consequent, and alternative. -- elif clauses are parsed as nested if statements. If :: List -> List -> (Maybe List) -> ShellCommand -- | An until command. Until :: List -> List -> ShellCommand -- | A while command. While :: List -> List -> ShellCommand -- | A word list or "$@". data WordList Args :: WordList WordList :: [Word] -> WordList -- | A single case clause. data CaseClause CaseClause :: [Word] -> List -> CaseTerm -> CaseClause -- | A case clause terminator. data CaseTerm -- |
--   ;;
--   
Break :: CaseTerm -- |
--   ;&
--   
FallThrough :: CaseTerm -- |
--   ;;&
--   
Continue :: CaseTerm -- | A redirection. data Redir -- | A redirection. Redir :: Maybe IODesc -> RedirOp -> Word -> Redir -- | An optional file descriptor. [redirDesc] :: Redir -> Maybe IODesc -- | The redirection operator. [redirOp] :: Redir -> RedirOp -- | The redirection target. [redirTarget] :: Redir -> Word -- | A here document. Heredoc :: HeredocOp -> String -> Bool -> Word -> Redir -- | The here document operator. [heredocOp] :: Redir -> HeredocOp -- | The here document delimiter. [heredocDelim] :: Redir -> String -- | True if the delimiter was quoted. [heredocDelimQuoted] :: Redir -> Bool -- | The document itself, if the delimiter was quoted, no expansions are -- parsed. If the delimiter was not quoted, parameter, arithmetic and -- command substitutions take place. [hereDocument] :: Redir -> Word -- | A redirection file descriptor. data IODesc -- | A file descriptor number. IONumber :: Int -> IODesc -- | A variable {varname} to allocate a file descriptor -- for. IOVar :: String -> IODesc -- | A redirection operator. data RedirOp -- |
--   <
--   
In :: RedirOp -- |
--   >
--   
Out :: RedirOp -- |
--   >|
--   
OutOr :: RedirOp -- |
--   >>
--   
Append :: RedirOp -- |
--   &>
--   
AndOut :: RedirOp -- |
--   &>>
--   
AndAppend :: RedirOp -- |
--   <<<
--   
HereString :: RedirOp -- |
--   <&
--   
InAnd :: RedirOp -- |
--   >&
--   
OutAnd :: RedirOp -- |
--   <>
--   
InOut :: RedirOp -- | A here document operator. data HeredocOp -- |
--   <<
--   
Here :: HeredocOp -- |
--   <<-
--   
HereStrip :: HeredocOp -- | A compound list of statements. newtype List List :: [Statement] -> List -- | A single statement in a list. data Statement Statement :: AndOr -> ListTerm -> Statement -- | A statement terminator. data ListTerm -- |
--   ;
--   
Sequential :: ListTerm -- |
--   &
--   
Asynchronous :: ListTerm -- | A right-associative list of pipelines. data AndOr -- | The last pipeline of a list. Last :: Pipeline -> AndOr -- | A && construct. And :: Pipeline -> AndOr -> AndOr -- | A || construct. Or :: Pipeline -> AndOr -> AndOr -- | A (possibly timed or inverted) pipeline, linked with | or -- |&. data Pipeline Pipeline :: Bool -> Bool -> Bool -> [Command] -> Pipeline -- | True if the pipeline is timed with time. [timed] :: Pipeline -> Bool -- | True if the pipeline is timed with the -p flag. [timedPosix] :: Pipeline -> Bool -- | True if the pipeline is inverted with !. [inverted] :: Pipeline -> Bool -- | A list of commands, separated by |, or |&. -- command1 |& command2 is treated as a shorthand for -- command1 2>&1 | command2. [commands] :: Pipeline -> [Command] -- | An assignment. data Assign Assign :: Parameter -> AssignOp -> RValue -> Assign -- | An assignment operator. data AssignOp -- |
--   =
--   
Equals :: AssignOp -- |
--   +=
--   
PlusEquals :: AssignOp -- | The right side of an assignment. data RValue -- | A simple word. RValue :: Word -> RValue -- | An array assignment, as (subscript, word) pairs. RArray :: [(Maybe Word, Word)] -> RValue instance GHC.Show.Show Language.Bash.Syntax.CaseClause instance GHC.Read.Read Language.Bash.Syntax.CaseClause instance GHC.Classes.Eq Language.Bash.Syntax.CaseClause instance Data.Data.Data Language.Bash.Syntax.CaseClause instance GHC.Show.Show Language.Bash.Syntax.Command instance GHC.Read.Read Language.Bash.Syntax.Command instance GHC.Classes.Eq Language.Bash.Syntax.Command instance Data.Data.Data Language.Bash.Syntax.Command instance GHC.Show.Show Language.Bash.Syntax.Pipeline instance GHC.Read.Read Language.Bash.Syntax.Pipeline instance GHC.Classes.Eq Language.Bash.Syntax.Pipeline instance Data.Data.Data Language.Bash.Syntax.Pipeline instance GHC.Show.Show Language.Bash.Syntax.AndOr instance GHC.Read.Read Language.Bash.Syntax.AndOr instance GHC.Classes.Eq Language.Bash.Syntax.AndOr instance Data.Data.Data Language.Bash.Syntax.AndOr instance GHC.Show.Show Language.Bash.Syntax.Statement instance GHC.Read.Read Language.Bash.Syntax.Statement instance GHC.Classes.Eq Language.Bash.Syntax.Statement instance Data.Data.Data Language.Bash.Syntax.Statement instance GHC.Show.Show Language.Bash.Syntax.List instance GHC.Read.Read Language.Bash.Syntax.List instance GHC.Classes.Eq Language.Bash.Syntax.List instance Data.Data.Data Language.Bash.Syntax.List instance GHC.Show.Show Language.Bash.Syntax.ShellCommand instance GHC.Read.Read Language.Bash.Syntax.ShellCommand instance GHC.Classes.Eq Language.Bash.Syntax.ShellCommand instance Data.Data.Data Language.Bash.Syntax.ShellCommand instance GHC.Show.Show Language.Bash.Syntax.Assign instance GHC.Read.Read Language.Bash.Syntax.Assign instance GHC.Classes.Eq Language.Bash.Syntax.Assign instance Data.Data.Data Language.Bash.Syntax.Assign instance GHC.Show.Show Language.Bash.Syntax.RValue instance GHC.Read.Read Language.Bash.Syntax.RValue instance GHC.Classes.Eq Language.Bash.Syntax.RValue instance Data.Data.Data Language.Bash.Syntax.RValue instance GHC.Enum.Enum Language.Bash.Syntax.AssignOp instance GHC.Enum.Bounded Language.Bash.Syntax.AssignOp instance GHC.Show.Show Language.Bash.Syntax.AssignOp instance GHC.Read.Read Language.Bash.Syntax.AssignOp instance GHC.Classes.Ord Language.Bash.Syntax.AssignOp instance GHC.Classes.Eq Language.Bash.Syntax.AssignOp instance Data.Data.Data Language.Bash.Syntax.AssignOp instance GHC.Enum.Enum Language.Bash.Syntax.ListTerm instance GHC.Enum.Bounded Language.Bash.Syntax.ListTerm instance GHC.Show.Show Language.Bash.Syntax.ListTerm instance GHC.Read.Read Language.Bash.Syntax.ListTerm instance GHC.Classes.Ord Language.Bash.Syntax.ListTerm instance GHC.Classes.Eq Language.Bash.Syntax.ListTerm instance Data.Data.Data Language.Bash.Syntax.ListTerm instance GHC.Show.Show Language.Bash.Syntax.Redir instance GHC.Read.Read Language.Bash.Syntax.Redir instance GHC.Classes.Eq Language.Bash.Syntax.Redir instance Data.Data.Data Language.Bash.Syntax.Redir instance GHC.Enum.Bounded Language.Bash.Syntax.HeredocOp instance GHC.Enum.Enum Language.Bash.Syntax.HeredocOp instance GHC.Show.Show Language.Bash.Syntax.HeredocOp instance GHC.Read.Read Language.Bash.Syntax.HeredocOp instance GHC.Classes.Ord Language.Bash.Syntax.HeredocOp instance GHC.Classes.Eq Language.Bash.Syntax.HeredocOp instance Data.Data.Data Language.Bash.Syntax.HeredocOp instance GHC.Enum.Bounded Language.Bash.Syntax.RedirOp instance GHC.Enum.Enum Language.Bash.Syntax.RedirOp instance GHC.Show.Show Language.Bash.Syntax.RedirOp instance GHC.Read.Read Language.Bash.Syntax.RedirOp instance GHC.Classes.Ord Language.Bash.Syntax.RedirOp instance GHC.Classes.Eq Language.Bash.Syntax.RedirOp instance Data.Data.Data Language.Bash.Syntax.RedirOp instance GHC.Show.Show Language.Bash.Syntax.IODesc instance GHC.Read.Read Language.Bash.Syntax.IODesc instance GHC.Classes.Eq Language.Bash.Syntax.IODesc instance Data.Data.Data Language.Bash.Syntax.IODesc instance GHC.Enum.Enum Language.Bash.Syntax.CaseTerm instance GHC.Enum.Bounded Language.Bash.Syntax.CaseTerm instance GHC.Show.Show Language.Bash.Syntax.CaseTerm instance GHC.Read.Read Language.Bash.Syntax.CaseTerm instance GHC.Classes.Ord Language.Bash.Syntax.CaseTerm instance GHC.Classes.Eq Language.Bash.Syntax.CaseTerm instance Data.Data.Data Language.Bash.Syntax.CaseTerm instance GHC.Show.Show Language.Bash.Syntax.WordList instance GHC.Read.Read Language.Bash.Syntax.WordList instance GHC.Classes.Eq Language.Bash.Syntax.WordList instance Data.Data.Data Language.Bash.Syntax.WordList instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.Command instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.ShellCommand instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.WordList instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.CaseClause instance Language.Bash.Operator.Operator Language.Bash.Syntax.CaseTerm instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.CaseTerm instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.Redir instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.IODesc instance Language.Bash.Operator.Operator Language.Bash.Syntax.RedirOp instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.RedirOp instance Language.Bash.Operator.Operator Language.Bash.Syntax.HeredocOp instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.HeredocOp instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.List instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.Statement instance Language.Bash.Operator.Operator Language.Bash.Syntax.ListTerm instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.ListTerm instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.AndOr instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.Pipeline instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.Assign instance Language.Bash.Operator.Operator Language.Bash.Syntax.AssignOp instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.AssignOp instance Language.Bash.Pretty.Pretty Language.Bash.Syntax.RValue -- | Word-level parsers. module Language.Bash.Parse.Word -- | Skip spaces, tabs, and comments. skipSpace :: Stream s m Char => ParsecT s u m () -- | Parse an arithmetic expression. arith :: Stream s m Char => ParsecT s u m String -- | Parse a word. word :: Stream s m Char => ParsecT s u m Word -- | Parse a here document as a word. This parses substitutions, but not -- most quoting. heredocWord :: Stream s m Char => ParsecT s u m Word -- | Parse a parameter name. name :: Stream s m Char => ParsecT s u m String -- | Parse a subscript. subscript :: Stream s m Char => ParsecT s u m Word -- | Parse an assignment. assign :: Stream s m Char => ParsecT s u m Assign -- | Parse the longest available operator from a list. operator :: Stream s m Char => [String] -> ParsecT s u m String -- | Bash script and input parsing. module Language.Bash.Parse -- | Parse a script or input line into a (possibly empty) list of commands. parse :: SourceName -> String -> Either ParseError List