Text.Parser: add `match` function for easier terminals
Text.Parser: add `match` function for easier terminals

In a grammar that accepts `Token k` as its token type, `match` reduces the
boilerplate required to parse terminals.

Instead of requiring a terminal parsing function per token (or token kind)
with a case split, this function requires an `Eq` implementation to compare kinds
of tokens.

kojiromike/Idris-dev,kojiromike/Idris-dev,kojiromike/Idris-dev,kojiromike/Idris-dev,kojiromike/Idris-dev,kojiromike/Idris-dev