On Wed, 2008-10-15 at 20:22 +0100, Andrew Coppin wrote: > I like Parsec. I use it for everything. But it does have one irritating > problem. > > Consider the following parser: > > expressions = many1 expression > > Suppose this is the top-level parser for my language.
I always wrap my top-level parsers in return const `ap` parser `ap` eof to express that they have to match the entire input. (This is a bit easier if you supply the missing Applicative instance: const <$> parser <*> eof ). I think Parsec should either do this itself or tell you what the un-consumed input tokens were, but it doesn't. jcc _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
