[Haskell-cafe] Re: [Parsec] No identEnd in ParsecToken?

Stephane Bortzmeyer bortzmeyer at nic.fr
Tue Sep 5 16:23:29 EDT 2006


On Tue, Sep 05, 2006 at 03:46:16PM +0100,
 Chris Kuklewicz <haskell at list.mightyreason.com> wrote 
 a message of 69 lines which said:

> Fixing this may be as simple as
> 
> > identifier = try $ do
> >     start <- letter
> >     rest <- many (alphaNum <|> char '-')
> >     end <- letter
> >     return ([start] ++ rest ++ [end])
> >   <?> "characters authorized for identifiers"

It does not work for me (and neither does the second). The "try"
argument always fails, probably because the term "many" on the "rest"
line is greedy and swallows the ending letter.


More information about the Haskell-Cafe mailing list