
* Christian Maeder
Perhaps I missed something. Can someone please explain why do we have to have two different third parsecs? Should one of them be deprecated? When would a user prefer one to another?
parsec-2 (and possibly its compatibility layer) may be deprecated or superseded at some stage.
I read the description of parsec3 package on hackage, it tries to give some explanation, but still:
1. It's not clear why "you may want to develop your code using this subset of parsec3 modules". What advantage does it give?
The parsec3 package only ensures that you are not using the compatibility layer for parsec2 given by the modules Text.ParserCombinators.Parsec*, because parsec3 code developed with these modules might not work with parsec2 or parsec-2.x.
From the description of parsec3 on hackage
[...] I do not recommend to unconditionally use parsec3 as dependency in cabal files of packages for hackage. But you may want to develop your code using this subset of parsec3 modules and finally change the dependency from parsec3 to parsec-3.1.1 [...] I got an impression that parsec3 should be used only during the development, not in a released package. But as a developer of a package I have pretty good understanding of what modules I'm using, and if in doubt I can simply run "grep -r Text.ParserCombinators.Parsec ." Maybe it would become more clear if you elaborate on who and how exactly might benefit from this package? Thanks, Roman -- Roman I. Cheplyaka :: http://ro-che.info/ Don't worry what people think, they don't do it very often. In-Reply-To: <4D467427.1000104@dfki.de>

Am 31.01.2011 22:28, schrieb Roman Cheplyaka:
From the description of parsec3 on hackage
[...] I do not recommend to unconditionally use parsec3 as dependency in cabal files of packages for hackage. But you may want to develop your code using this subset of parsec3 modules and finally change the dependency from parsec3 to parsec-3.1.1 [...]
I got an impression that parsec3 should be used only during the development, not in a released package. But as a developer of a package I have pretty good understanding of what modules I'm using, and if in doubt I can simply run "grep -r Text.ParserCombinators.Parsec ."
Maybe it would become more clear if you elaborate on who and how exactly might benefit from this package?
I agree, parsec3 is of limited use. It only ensures a disjoint module name space with parsec2 xor parsec1 for old or more portable code. So you could have parsec2 and parsec3 code without being forced to compile your parsec-2.x sources via the compatibility layer of parsec-3.x. C.
Thanks, Roman

* Christian Maeder
Am 31.01.2011 22:28, schrieb Roman Cheplyaka:
From the description of parsec3 on hackage
[...] I do not recommend to unconditionally use parsec3 as dependency in cabal files of packages for hackage. But you may want to develop your code using this subset of parsec3 modules and finally change the dependency from parsec3 to parsec-3.1.1 [...]
I got an impression that parsec3 should be used only during the development, not in a released package. But as a developer of a package I have pretty good understanding of what modules I'm using, and if in doubt I can simply run "grep -r Text.ParserCombinators.Parsec ."
Maybe it would become more clear if you elaborate on who and how exactly might benefit from this package?
I agree, parsec3 is of limited use. It only ensures a disjoint module name space with parsec2 xor parsec1 for old or more portable code.
Please don't get me wrong, I am not claiming that it's useless, rather genuinely trying to understand what problem it solves.
So you could have parsec2 and parsec3 code without being forced to compile your parsec-2.x sources via the compatibility layer of parsec-3.x.
You mean using Parsec 2 and Parsec 3 interfaces in one package? But why would anyone want to develop a package with one implementation (Parsec 2) and release it depending on another implementation (Parsec 3 compat. layer)? (If I got you right.) -- Roman I. Cheplyaka :: http://ro-che.info/ Don't worry what people think, they don't do it very often.

Am 01.02.2011 21:29, schrieb Roman Cheplyaka:
* Christian Maeder
[2011-02-01 15:03:41+0100] Am 31.01.2011 22:28, schrieb Roman Cheplyaka:
From the description of parsec3 on hackage
[...] I do not recommend to unconditionally use parsec3 as dependency in cabal files of packages for hackage. But you may want to develop your code using this subset of parsec3 modules and finally change the dependency from parsec3 to parsec-3.1.1 [...]
I got an impression that parsec3 should be used only during the development, not in a released package. But as a developer of a package I have pretty good understanding of what modules I'm using, and if in doubt I can simply run "grep -r Text.ParserCombinators.Parsec ."
Maybe it would become more clear if you elaborate on who and how exactly might benefit from this package?
I agree, parsec3 is of limited use. It only ensures a disjoint module name space with parsec2 xor parsec1 for old or more portable code.
Please don't get me wrong, I am not claiming that it's useless, rather genuinely trying to understand what problem it solves.
So you could have parsec2 and parsec3 code without being forced to compile your parsec-2.x sources via the compatibility layer of parsec-3.x.
You mean using Parsec 2 and Parsec 3 interfaces in one package?
No, the parsec-3.x packages contains already both interfaces, but with a different implementation for the Text.ParserCombinators.Parsec modules. With parsec3 and parsec1 you'll get (at least in my eyes) a better (though incompatible) implementation for the Text.ParserCombinators.Parsec modules.
But why would anyone want to develop a package with one implementation (Parsec 2) and release it depending on another implementation (Parsec 3 compat. layer)? (If I got you right.)
I assumed parsec-3.x will be installed anyway earlier or later by some other packages (there by shadowing parsec-2.x) and I considered installing parsec3 and parsec1 (or parsec2) in addition as the greater disadvantage than going through parsec-3.x's compat-layer for casual users, who may not be able to cope with ambiguous module names (i.e. via .cabal files). 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. HTH Christian

On Wed, Feb 2, 2011 at 2:07 AM, Christian Maeder
Am 01.02.2011 21:29, schrieb Roman Cheplyaka:
* Christian Maeder
[2011-02-01 15:03:41+0100] Am 31.01.2011 22:28, schrieb Roman Cheplyaka:
From the description of parsec3 on hackage
[...] I do not recommend to unconditionally use parsec3 as dependency in cabal files of packages for hackage. But you may want to develop your code using this subset of parsec3 modules and finally change the dependency from parsec3 to parsec-3.1.1 [...]
I got an impression that parsec3 should be used only during the development, not in a released package. But as a developer of a package I have pretty good understanding of what modules I'm using, and if in doubt I can simply run "grep -r Text.ParserCombinators.Parsec ."
Maybe it would become more clear if you elaborate on who and how exactly might benefit from this package?
I agree, parsec3 is of limited use. It only ensures a disjoint module name space with parsec2 xor parsec1 for old or more portable code.
Please don't get me wrong, I am not claiming that it's useless, rather genuinely trying to understand what problem it solves.
So you could have parsec2 and parsec3 code without being forced to compile your parsec-2.x sources via the compatibility layer of parsec-3.x.
You mean using Parsec 2 and Parsec 3 interfaces in one package?
No, the parsec-3.x packages contains already both interfaces, but with a different implementation for the Text.ParserCombinators.Parsec modules.
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 think I'm just really confused - under what scenario I would prefer using the 'parsec3' package to the 'parsec' package.
With parsec3 and parsec1 you'll get (at least in my eyes) a better (though incompatible) implementation for the Text.ParserCombinators.Parsec modules.
But why would anyone want to develop a package with one implementation (Parsec 2) and release it depending on another implementation (Parsec 3 compat. layer)? (If I got you right.)
I assumed parsec-3.x will be installed anyway earlier or later by some other packages (there by shadowing parsec-2.x) and I considered installing parsec3 and parsec1 (or parsec2) in addition as the greater disadvantage than going through parsec-3.x's compat-layer for casual users, who may not be able to cope with ambiguous module names (i.e. via .cabal files).
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. 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). Antoine
HTH Christian
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

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

On Wed, Feb 2, 2011 at 10:16 AM, Christian Maeder
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).
Ah! So you want two implementations of a 'parsec' style parser in a single package, then? I've never found myself wanting to do that, but I can see how you would end up with a smaller testing/upgrade overhead. Antoine

Am 02.02.2011 17:31, schrieb Antoine Latter:
On Wed, Feb 2, 2011 at 10:16 AM, Christian Maeder
wrote: 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).
Ah! So you want two implementations of a 'parsec' style parser in a single package, then?
Well, yes, where my "single package" is for a large binary and the source pool allows to create separate special-purpose binaries. C.
I've never found myself wanting to do that, but I can see how you would end up with a smaller testing/upgrade overhead.
Antoine
participants (3)
-
Antoine Latter
-
Christian Maeder
-
Roman Cheplyaka