kowainik / stan

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

Implement check for the compile-time and runtime GHC version #381

Open chshersh opened 3 years ago

chshersh commented 3 years ago

Currently Stan panics when GHC versions are different. But it's possible to implement a check with a good error message. This check wouldn't be needed if the following GHC feature was implemented:

However, it doesn't look like it will be implemented soon, so providing a better UX is worth spending time on 🙂

For the implementation, we should use ghc-check by @pepeiborra. The package already does an excellent job on covering all tricky cases, and it's used in ghcide.