pEof :: Parser ()
pEof = getState >>= \s->case s.tokens of
[] = pure ()
- [t:ts] = liftT (Left ["Expected EOF"])
+ [t:ts] = liftT (Left ["Expected EOF but got ":map toString [t:ts]])
(?) infixl 9 :: (Parser a) (a -> Bool) -> Parser a
(?) p f = p >>= \v->if (f v) (pure v) empty