Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Bash words and substitutions.
- type Word = [Span]
- data Span
- data Parameter = Parameter String (Maybe Word)
- data ParamSubst
- = Bare { }
- | Brace { }
- | Alt { }
- | Substring { }
- | Prefix { }
- | Indices { }
- | Length { }
- | Delete { }
- | Replace {
- indirect :: Bool
- parameter :: Parameter
- replaceAll :: Bool
- replaceDirection :: Maybe Direction
- pattern :: Word
- replacement :: Word
- | LetterCase {
- indirect :: Bool
- parameter :: Parameter
- letterCaseOp :: LetterCaseOp
- convertAll :: Bool
- pattern :: Word
- data AltOp
- data LetterCaseOp
- data Direction
- data ProcessSubstOp
- fromString :: String -> Word
- unquote :: Word -> String
Words
An individual unit of a word.
Char Char | A normal character. |
Escape Char | An escaped character. |
Single Word | A single-quoted string. |
Double Word | A double-quoted string. |
ANSIC Word | A ANSI C string. |
Locale Word | A locale-translated string. |
Backquote Word | A backquote-style command substitution.
To extract the command string, |
ParamSubst ParamSubst | A parameter substitution. |
ArithSubst String | An arithmetic substitution. |
CommandSubst String | A command substitution. |
ProcessSubst ProcessSubstOp String | A process substitution. |
Parameters
A parameter name an optional subscript.
data ParamSubst Source
A parameter substitution.
Bare | |
Brace | |
Alt | |
Substring | |
Prefix | |
Indices | |
Length | |
Delete | |
Replace | |
| |
LetterCase | |
|
An alternation operator.
AltDefault |
|
AltAssign | '=', |
AltError |
|
AltReplace |
|
data LetterCaseOp Source
A letter case operator.
A string direction.
Process
data ProcessSubstOp Source
A process substitution.
Manipulation
fromString :: String -> Word Source
Convert a string to an unquoted word.