In class, we wrote parsers by defining our own Parser type and this gave us a lot of flexibility. For example, if we wanted to make code and parse out "[at]" as '@', we could write
atParser = Parser $ \s ->
case s of
w:x:y:z:zs ->
| (w:x:y:z:[]) == "[at]" = ['@',zs]
| otherwise = []
zs -> []
However, I cannot figure out how to implement this sort of parser using Text.ParserCombinators. Is it possible?
Thanks