Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Ormolu on GHC (in particular its testsuite) #821

Open
amesgen opened this issue Nov 2, 2021 · 0 comments
Open

Run Ormolu on GHC (in particular its testsuite) #821

amesgen opened this issue Nov 2, 2021 · 0 comments
Labels

Comments

@amesgen
Copy link
Member

amesgen commented Nov 2, 2021

GHC and its testsuite contains a lot of Haskell source code with many special cases, so trying to format it with Ormolu can be useful to further increase the robustness of Ormolu.

In amesgen/ormolize-ghc, I added preliminary support for Ormelizing ghc (it is not clear if we ever want to merge this, but it is useful for get a nice log of an Ormolu run on the CPP-clean GHC codebase via nix-build -A hackage.ghc). As many files in the testsuite are supposed to fail when being parsed/compiled, I added a basic whitelist (via an ugly regex) for files I think should be fine. Some extra files have to be excluded as cpphs can't process them.

I uploaded the (slightly cleaned up) log file here: https://gist.github.com/amesgen/6d6d3de90d33b076d1cdf3806aa2c9dd

I will now open some bugs found this way (probably not exhaustive at all).


Credits for this idea go to @utdemir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants