sep
sepBy p sep parses zero or more occurrences of p, separated by sep. Returns a list of values returned by p.
sepBy1 p sep parses one or more occurrences of p, separated by sep. Returns a list of values returned by p.
Either hsep or vcat
sepBy p sep parses zero or more occurrences of p, separated by sep. Returns a list of values returned by p.
> commaSep p = p `sepBy` (symbol ",")
sepBy1 p sep parses one or more occurrences of p, separated by sep. Returns a list of values returned by p.
sepEndBy p sep parses zero or more occurrences of p, separated and optionally ended by sep, ie. haskell style statements. Returns a list of values returned by p.
> haskellStatements = haskellStatement `sepEndBy` semi
sepEndBy1 p sep parses one or more occurrences of p, separated and optionally ended by sep. Returns a list of values returned by p.
Pe: Punctuation, Close
Selects Unicode space and separator characters.
Zl: Separator, Line
Zp: Separator, Paragraph
Add a trailing file path separator if one is not already present.
> hasTrailingPathSeparator (addTrailingPathSeparator x)
> hasTrailingPathSeparator x ==> addTrailingPathSeparator x == x
> Posix: addTrailingPathSeparator "test/rest" == "test/rest/"
Lexeme parser commaSep p parses zero or more occurrences of p separated by comma. Returns a list of values returned by p.
Lexeme parser commaSep1 p parses one or more occurrences of p separated by comma. Returns a list of values returned by p.
Remove any trailing path separators
> dropTrailingPathSeparator "file/test/" == "file/test"
> Posix: not (hasTrailingPathSeparator (dropTrailingPathSeparator x)) || isDrive x
> Posix: dropTrailingPathSeparator "/" == "/"
> Windows: dropTrailingPathSeparator "\\" == "\\"
File extension character
> extSeparator == '.'
"Paragraph fill" version of sep.
"Paragraph fill" version of sep
Is an item either a directory or the last character a path separator?
> hasTrailingPathSeparator "test" == False
> hasTrailingPathSeparator "test/" == True
Is the character an extension character?
> isExtSeparator a == (a == extSeparator)
Rather than using (== pathSeparator), use this. Test if something is a path separator.
> isPathSeparator a == (a `elem` pathSeparators)
Is the character a file separator?
> isSearchPathSeparator a == (a == searchPathSeparator)
parseProxy str translates a proxy server string into a Proxy value; returns Nothing if not well-formed.
The character that separates directories. In the case one character is possible, pathSeparator is the 'ideal' one.
> Windows: pathSeparator == '\\'
> Posix: pathSeparator == '/'
> isPathSeparator pathSeparator
The list of all possible separators.
> Windows: pathSeparators == ['\\', '/']
> Posix: pathSeparators == ['/']
> pathSeparator `elem` pathSeparators
The character that is used to separate the entries in the $PATH environment variable.
> Windows: searchPathSeparator == ';'
> Posix: searchPathSeparator == ':'
Lexeme parser semiSep p parses zero or more occurrences of p separated by semi. Returns a list of values returned by p.
Lexeme parser semiSep1 p parses one or more occurrences of p separated by semi. Returns a list of values returned by p.
Show more results