Help wanted: convert stan to GHC 9.10

stan is a static analysis tool for Haskell. It uses the GHC API, so after every major release of GHC it needs to be tweaked, often with a bunch of CPP. The GHC 9.10 release is no different. I’ve worked out what all the new usages of the GHC API should be, it just needs CPP applied so it works with the new version and all previous versions.

Help wanted: would anyone like to volunteer to apply the CPP?

Apply here: Support GHC 9.10 · Issue #564 · kowainik/stan · GitHub

5 Likes

Btw, does it need to depend on ghc? Perhaps ghc-lib would be enough, then you wouldn’t have to drown in CPP for the cost of supporting latest 3 ghc releases with a given stan version.

That’s what I do in ghc-tags (see e.g. Add support for GHC 9.10 and drop support for GHC 9.4 by arybczak · Pull Request #23 · arybczak/ghc-tags · GitHub), the sad reality is that I wouldn’t maintain it if I had to play the (increasingly difficult) CPP game after each major ghc release.

1 Like

Thanks to @philderbeast for volunteering!

This is an interesting question. Thanks for the suggestion. In this case I think not, because most of the changes are in the data returned by the GHC API, rather than in the GHC API itself. For example, in the latest base the implementation of much functionality has been moved to a new package called ghc-internal. Most of the CPP required is to tell stan to look in ghc-internal in the latest base. That requires changing a string, rather than a usage of a Haskell API.