[Haskell-cafe] haskell-src-exts maintenance

Matthew Pickering matthewtpickering at gmail.com
Wed Jul 1 09:29:10 UTC 2015


Separating the parser from GHC is not trivial. Firstly the parser
takes DynFlags as an argument which is used in all stages of the GHC
pipeline to keep track of which flags are enabled. Second - this would
also require all syntactic datatypes to be extracted into a separate
module as well as all the various datatypes which they depend on as
well, for example RdrName depends on Name which is only introduced
after the parsing stage but would also need to be extracted.

HSE is also desirable because it already has momentum, a not
insignificant number of programs use tooling based on HSE. Secondly,
it is much easier to manipulate in general than the GHC AST,
especially the difference between the annotated and unannotated
source.

All this being said, I would much prefer a world where GHC was easier
to use as a library for this kind of thing as it is difficult to
remain consistent between the two but keeping HSE updated should
remain important in the near future.

Matt

On Wed, Jul 1, 2015 at 8:18 AM, Mike Izbicki <mike at izbicki.me> wrote:
> I've always been curious why we need a stand alone package for parsing
> haskell code?  Last time I tried to use haskell-src-exts (admittedly
> several years ago), it was out of date and didn't support the
> extensions I wanted.
>
> It seems like the ideal solution would be to have GHC's parsing code
> exposed as a library.  And this library would be compatible with
> template haskell.  Is there some technical reason why this is
> inherently difficult?  Or is it just an accident of history that
> things didn't develop that way?
>
> On Tue, Jun 30, 2015 at 11:54 PM, Christian Marie <christian at ponies.io> wrote:
>> On Mon, Jun 29, 2015 at 01:13:54PM +0100, Matthew Pickering wrote:
>>> There are a large number of untriaged pull requests and issues
>>> currently open on the issue tracker for haskell-src-exts. The tool is
>>> widely used by tool writers but the last commit to the project is now
>>> over 6 months ago.
>>
>> I was about to post this exact message after searching around for a good hour.
>>
>>> 1. Does anyone know if Niklas or Peter plan to return to the project?
>>
>> I didn't contact them directly. I'm not so sure if Nicklas is active at all.
>>
>>> 2. Is there anyone else who is interested in updating the HSE parser?
>>
>> Yes, I've got at least one fix I'd like to make myself and I'd be happy to do
>> some triaging and releasing too. Most of the PRs look pretty good.
>>
>> Roman Cheplyaka is a maintainer on hackage, hopefully he sees and knows
>> something aobut this.
>>
>> I'll email some people in the haskell suite group directly if this thread
>> doesn't go anywhere.
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list