kowainik / stan

🕵️ Haskell STatic ANalyser
https://kowainik.github.io/projects/stan
Mozilla Public License 2.0
570 stars 48 forks source link

Support GHC-8.10 #242

Closed chshersh closed 4 years ago

chshersh commented 4 years ago

We don't use much of GHC API, so it shouldn't be that hard. But if some API changes, I propose to handle this in the following way:

  1. Create Stan.Hie.Compat with CPP around relevant functions to work with HIE. Ideally, the implementations of functions from different GHC versions are allowed to be different, but the types should be the same whenever it's possible to achieve it, so we can use them in other modules and have CPP only in Stan.Hie.Compat.
  2. Optionally, if some other parts of GHC change, create the Stan.Ghc (or Stan.Ghc.Compat) module and do the same as for Stan.Hie.Compat.

I hope that none of this will be required since we don't use unstable parts of the GHC API. But it's a plan to keep in mind.