Let's create a parser that consumes one character and produces that character, unless the input is empty, in which case fail.
character :: Parser Char character = P (\s -> case s of [] -> Nothing (c:r) -> Just (r, c))