Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- manyP :: (Stream s, Ord e) => (Token s -> Bool) -> ParsecT e s m (Tokens s)
- someP :: (Stream s, Ord e) => (Token s -> Bool) -> ParsecT e s m (Tokens s)
- manyText :: (Stream s, Ord e) => ParsecT e s m Text -> ParsecT e s m Text
- someText :: (Stream s, Ord e) => ParsecT e s m Text -> ParsecT e s m Text
- commonPrefix :: Text -> Text -> Text
- commonIndentation :: [Text] -> Maybe Text
- dropCommonIndentation :: [Text] -> [Text]
- identChar :: Char -> Bool
- isSpaces :: Text -> Bool
- pathChar :: Char -> Bool
- replaceMultiple :: [(Text, Text)] -> Text -> Text
- schemeChar :: Char -> Bool
- uriChar :: Char -> Bool
Documentation
manyP :: (Stream s, Ord e) => (Token s -> Bool) -> ParsecT e s m (Tokens s) Source #
Match zero or more characters that match a predicate.
someP :: (Stream s, Ord e) => (Token s -> Bool) -> ParsecT e s m (Tokens s) Source #
Match one or more characters that match a predicate.
manyText :: (Stream s, Ord e) => ParsecT e s m Text -> ParsecT e s m Text Source #
Match zero or more texts and return the concatenation.
someText :: (Stream s, Ord e) => ParsecT e s m Text -> ParsecT e s m Text Source #
Match one or more texts and return the concatenation.
commonIndentation :: [Text] -> Maybe Text Source #
The longest common prefix consisting of only whitespace. The longest common prefix of zero texts is infinite, represented as Nothing.
dropCommonIndentation :: [Text] -> [Text] Source #
Strip the longest common indentation from a list of lines. Empty lines do not count towards the common indentation.
replaceMultiple :: [(Text, Text)] -> Text -> Text Source #
Apply multiple independent replacements. This function passes over the text once and applies the first replacement it can find at each position. After a replacement is matched, the function continues after the replacement, not inside it.
schemeChar :: Char -> Bool Source #