
Am 02.02.2011 16:27, schrieb Antoine Latter:
What do you mean by 'different implementation'? The parsec-3 compatibility layer simply re-exports the Text.Parsec.* functions and types in a different module hierarchy. Maybe I missunderstood what you mean.
I mean the two implementations: original parsec-2 code and the compatibility layer of parsec-3
I think I'm just really confused - under what scenario I would prefer using the 'parsec3' package to the 'parsec' package.
In the case, where you want your old parsec-2 code to (continue to) use the original implementation and your new code to use the parsec3 implementation (in one project). [...]
The main problem is that the parsec-3.x package is not split up into two packages, which would allow to install the compatibility layer separately if needed.
For those interested in the history behind this - the concern at the time was that many modules specified 'parsec' as a dependency without an upper-bound on which version they needed. Since we didn't want those to break, we re-exported the new modules under the old names.
It would have been perfect if parsec-3.x had just supplied the Text.ParserCombinators.Parsec modules on top of a separate parsec3 package. But now there are many packages on hackage that expect Text.Parsec modules in parsec-3.x instead of taking them from parsec3 (that did not exist earlier).
That doesn't mean it's a good situation now - but I don't see the harm in keeping the comparability layer around for a bit (other than the complexity burden).
I agree, but I don't see, how you ever will get rid of the compatibility layer, because it is needed for some old packages that did not say "parsec < 3" and it is needed for packages that say "parsec > 2" but still use the Text.ParserCombinators.Parsec modules. (Old packages can be updated to "parsec < 3" or even to parsec1 if ambiguous module names are no issue.) If you are going to deprecate (or remove) the compatibility layer at some stage parsec3 will become obsolete. Until then parsec3 can be used to test this situation in advance. Cheers Christian