This module contains Char-specific Parsers.
Avoid using this module if performance is a concern. You can achieve
everything that you can do with this module by using Combine.regex,
Combine.string or Combine.primitive and, in general, those will be
much faster.
Parse an exact character match.
parse (char 'a') "a" ==
-- Ok 'a'
parse (char 'a') "b" ==
-- Err ["expected 'a'"]Parse any character.
parse anyChar "a" ==
-- Ok 'a'
parse anyChar "" ==
-- Err ["expected any character"]Parse a character from the given list.
parse (oneOf ['a', 'b']) "a" ==
-- Ok 'a'
parse (oneOf ['a', 'b']) "c" ==
-- Err ["expected one of ['a','b']"]Parse a character that is not in the given list.
parse (noneOf ['a', 'b']) "c" ==
-- Ok 'c'
parse (noneOf ['a', 'b']) "a" ==
-- Err ["expected none of ['a','b']"]
Parse a character matching the predicate.