Maybe -base +parsec

optionMaybe :: Stream s m t => ParsecT s u m a -> ParsecT s u m (Maybe a)
parsec Text.Parsec.Combinator, parsec Text.ParserCombinators.Parsec.Combinator
optionMaybe p tries to apply parser p. If p fails without consuming input, it return Nothing, otherwise it returns Just the value returned by p.