Advance notice that I'd like to make Cabal depend on parsec

Duncan Coutts duncan.coutts at googlemail.com
Fri Mar 15 16:22:11 CET 2013


On Fri, 2013-03-15 at 12:57 +0000, Malcolm Wallace wrote:
> On 14 Mar 2013, at 14:53, Duncan Coutts wrote:
> 
> > Why did I choose parsec? Practicality dictates that I can only use
> > things in the core libraries, and the nearest thing we have to that is
> > the parser lib that is in the HP.
> 
> I fully agree that a real parser is needed for Cabal files.  I
> implemented one myself, many years ago, using the polyparse library,
> and using a hand-written lexer.  Feel free to reuse it (attached,
> together with a sample program) if you like, although I expect it has
> bit-rotted a little over time.

Thanks Malcolm. I should point out that I would also be perfectly happy
to use polyparse. The practical constraint is that Cabal can only depend
on other Core libs. My assumption was that moving parsec from HP to core
was easier than adding polyparse into core. But if someone wanted to
suggest ripping ReadP out of base and replacing it with polyparse, I
would certainly not complain.

Duncan




More information about the ghc-devs mailing list