String +parsec
string s parses a sequence of characters given by s. Returns the parsed string (i.e. s).
> divOrMod = string "div"
> <|> string "mod"
This lexeme parser parses a literal string. Returns the literal string value. This parsers deals correctly with escape sequences and gaps. The literal string is parsed according to the grammar rules defined in the Haskell report (which matches most programming languages quite closely).
Make Strings an instance of Stream with Char token type.
Extract the message string from an error message
Make strict ByteStrings an instance of Stream with Char token type.
The expression updatePosString pos s updates the source position pos by calling updatePosChar on every character in s, ie. foldl updatePosChar pos string.