haskell-suite / haskell-src-exts

Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
Other
193 stars 94 forks source link

Typed TH splices and quotations support #432

Closed dzhus closed 4 years ago

dzhus commented 5 years ago

So I got annoyed by https://github.com/ndmitchell/hlint/issues/332 and took a stab at this too. This builds upon #410, using new constructors to parse $$(s and [||s. I added some minimal tests too. This fixes #278.

dzhus commented 5 years ago

I don't think that test failure has anything to do with this change

AshleyYakeley commented 5 years ago

The current version parses $e and $(e).

Can you check that this PR parses both $$e and $$(e)? I believe is does not parse $$e.

dzhus commented 5 years ago

@AshleyYakeley you're right – it can now do $$id as well, tests are updated too

dzhus commented 5 years ago

CI failure is the same as before – not related to this change I think

pwm commented 4 years ago

Hi @dzhus what's the status on this? Any reason it has not been merged yet?

dzhus commented 4 years ago

@pwm Probably because maintainer haven't got to do so yet. In the meantime hlint switched to GHC parser and the original problem no longer exists really :)

pwm commented 4 years ago

@dzhus Ah thanks, interesting. I'm pretty sure I've built hlint fairly recently from source and ran into this. Maybe they've switched to GHC parser after? Thanks anyway, will investigate.

Edit: Ah ok, needs I need 8.8 it seems: https://github.com/ndmitchell/hlint/blob/master/hlint.cabal#L76

dzhus commented 4 years ago

@pwm actually, I may be wrong – I may have been testing it incorrectly