Partially evaluating CPP macros in Haskell codebases

from blog Terms and Truth-Conditions, | ↗ original
The Haskell Language Server (HLS) codebase has a lot of CPP conditionals. A lot of them look like this: #if MIN_VERSION_ghc(9,2,0) which says that the version of the ghc library has to be at least 9.2; or this #if MIN_VERSION_ghc(9,2,0) && !MIN_VERSION_ghc(9,3,0) which says that the version of the ghc library has to be between 9.2 and 9.3; or...