Re: [Haskell-cafe] Re: A parsec question

2010-10-03 Thread Antoine Latter
On Sun, Oct 3, 2010 at 11:55 AM, Ben Franksen wrote: > Stephen Tetley wrote: >> Does this one give the "expected" error message for Parsec3.1 - >> unfortunately I can't test as I'm still using Parsec 2.1.0.1. >> >>> parser = block (many digit "digit") > > Unfortunately, no. > > Cheers > Ben > He

[Haskell-cafe] Re: A parsec question

2010-10-03 Thread Ben Franksen
Stephen Tetley wrote: > Does this one give the "expected" error message for Parsec3.1 - > unfortunately I can't test as I'm still using Parsec 2.1.0.1. > >> parser = block (many digit "digit") Unfortunately, no. Cheers Ben ___ Haskell-Cafe mailing li

Re: [Haskell-cafe] Re: A parsec question

2010-10-02 Thread Antoine Latter
On Wed, Sep 29, 2010 at 1:01 PM, Daniel Fischer wrote: > On Wednesday 29 September 2010 19:10:22, Ben Franksen wrote: >> > >> > Note the last line mentions only '}'. I would rather like to see >> > >> >   expecting "}" or digit >> > >> > since the parser could very well accept another digit here.

[Haskell-cafe] Re: A parsec question

2010-09-30 Thread Ben Franksen
Christian Maeder wrote: > Am 29.09.2010 20:01, schrieb Daniel Fischer: >> On Wednesday 29 September 2010 19:10:22, Ben Franksen wrote: Note the last line mentions only '}'. I would rather like to see expecting "}" or digit since the parser could very well accept anot

[Haskell-cafe] Re: A parsec question

2010-09-30 Thread Christian Maeder
Am 29.09.2010 20:01, schrieb Daniel Fischer: > On Wednesday 29 September 2010 19:10:22, Ben Franksen wrote: >>> >>> Note the last line mentions only '}'. I would rather like to see >>> >>> expecting "}" or digit >>> >>> since the parser could very well accept another digit here. > > parsec2 did

Re: [Haskell-cafe] Re: A parsec question

2010-09-29 Thread Daniel Fischer
On Wednesday 29 September 2010 19:10:22, Ben Franksen wrote: > > > > Note the last line mentions only '}'. I would rather like to see > > > > expecting "}" or digit > > > > since the parser could very well accept another digit here. parsec2 did that, I don't know whether that change is intention

[Haskell-cafe] Re: A parsec question

2010-09-29 Thread Ben Franksen
Ben Franksen wrote: >> import Control.Applicative ((*>),(<*)) >> import Text.Parsec >> import Text.Parsec.Char >> block p = char '{' *> p <* char '}' >> parser = block (many digit) >> main = parseTest parser "{123a}" > > gives the output > > parse error at (line 1, column 5): > unexpected "a"