Re: [Haskell-cafe] a little parsec enhancement

2013-09-09 Thread Petr Pudlák
I'd appreciate exporting adding such aliases for creating and running ParsecT the 3.1.x way. Thanks, Petr Dne 09/06/2013 10:56 PM, Antoine Latter napsal(a): The exported `mkPT` is equivalent to the old 'ParsecT' data constructor from parsec 3.0.x. I wouldn't mind exporting a similar

Re: [Haskell-cafe] a little parsec enhancement

2013-09-06 Thread Petr Pudlák
Dne 09/05/2013 01:38 PM, Roman Cheplyaka napsal(a): * Petr Pudlák petr@gmail.com [2013-09-05 11:18:25+0200] Unfortunately |ParsecT| constructor isn't exported so I'm not able to implement it outside /parsec/. No, but there's an 'mkPT' function which is equivalent to the ParsecT

Re: [Haskell-cafe] a little parsec enhancement

2013-09-06 Thread Antoine Latter
The exported `mkPT` is equivalent to the old 'ParsecT' data constructor from parsec 3.0.x. I wouldn't mind exporting a similar alias for the new 'ParsecT' constructor from 3.1.x. On Fri, Sep 6, 2013 at 2:21 PM, Petr Pudlák petr@gmail.com wrote: Dne 09/05/2013 01:38 PM, Roman Cheplyaka

[Haskell-cafe] a little parsec enhancement

2013-09-05 Thread Petr Pudlák
Hi, when thinking about this SO question http://stackoverflow.com/q/18583416/1333025, I couldn't find a combinator that allows a parser to /optionally/ fail without consuming input, or consume input and return its value. So I'm suggesting such a function: |-- | @emptyIf p@ parses @p@ and

Re: [Haskell-cafe] a little parsec enhancement

2013-09-05 Thread Roman Cheplyaka
* Petr Pudlák petr@gmail.com [2013-09-05 11:18:25+0200] Unfortunately |ParsecT| constructor isn't exported so I'm not able to implement it outside /parsec/. No, but there's an 'mkPT' function which is equivalent to the ParsecT constructor. (Although I, too, wish the ParsecT constructor