Skip to content

WIP: Migrate to ghc-lib-parser-9.0.1#720

Closed
berberman wants to merge 3 commits intotweag:masterfrom
berberman:ghc-lib-parser-901
Closed

WIP: Migrate to ghc-lib-parser-9.0.1#720
berberman wants to merge 3 commits intotweag:masterfrom
berberman:ghc-lib-parser-901

Conversation

@berberman
Copy link
Copy Markdown

@berberman berberman commented Jul 14, 2021

Close #688.

This PR is very unpolished, though currently it builds, and all tests can pass with cfgUnsafe = True. Since I'm not very familiar with the changes in ASTs since GHC 9.0, basically I write these code following the hints from the powerful type system and intuition. It would be great if someone could help :)

TODO

  • Figure out why we need ImpredicativeTypes to typecheck Ormolu.Diff.ParseResult in GHC 9 (perhaps something related to simplified subsumption?)
  • Make tests pass with cfgUnsafe = False
  • Add tests for new syntax in GHC 9
  • Cleanup code and squash commits

I also have a question that is there any use case of BufSpans in ormolu? They are now ignored.

@mrkkrp
Copy link
Copy Markdown
Member

mrkkrp commented Jul 14, 2021

Thanks for starting this!

I also have a question that is there any use case of BufSpans in ormolu? They are now ignored.

I don't see any mention of BufSpan in the source

@amesgen amesgen mentioned this pull request Jul 23, 2021
@amesgen
Copy link
Copy Markdown
Contributor

amesgen commented Jul 26, 2021

Thank you for this! I started to work on this independently (probably should've created a draft PR earlier), and I think #722 mostly finished by now. Your remark that ImpredicativeTypes makes Ormolu.Diff.ParseResult compile was very useful (and it is indeed due to simplified subsumption).

@amesgen amesgen closed this Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to ghc-lib-parser-9.0.1.xxx

3 participants