Advance notice that I'd like to make Cabal depend on parsec
duncan.coutts at googlemail.com
Fri Mar 22 19:42:21 CET 2013
On Thu, 2013-03-21 at 17:51 -0400, Isaac Dupree wrote:
> On 03/18/2013 12:55 PM, Duncan Coutts wrote:
> > [...] it
> > is not simply the outline parser for cabal-style files that we're
> > talking about. We also need parsers/pretty printers for all the various
> > little types that make up the info about packages, like versions,
> > package names, package ids, version constraints, module names, licenses
> > etc etc.
> (ignorant musing that doesn't help the general difficult of writing a
> Happy parser: )
> Can they not use multiple Happy parsers generated from the same Happy file?
Well the compositionality is there for the benefit of other packages,
not just as an internal convenience for the Cabal lib. If we dropped
that feature then yes we could use monolithic parsers for each of these
types. Other packages do use the ability to build new parsers out of old
however, in particular cabal-install does.
More information about the Libraries