LeventErkok / sbv

SMT Based Verification in Haskell. Express properties about Haskell programs and automatically prove them using SMT solvers.
https://github.com/LeventErkok/sbv
Other
241 stars 33 forks source link

Versions 10.11 and 10.12 don't build with GHC 9.4.8 #726

Open eddywestbrook opened 4 days ago

eddywestbrook commented 4 days ago

When I try to build either sbv-10.11 or sbv-10.12 under GHC 9.4.8, I get the following error:

Data/SBV/Core/Model.hs:64:1: error: [-Wdodgy-imports, -Werror=dodgy-imports]
    Module ‘GHC.TypeLits’ does not export ‘SChar’
   |
64 | import GHC.TypeLits hiding (SChar)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I'm assuming it's because SChar was only added to the GHC.TypeLits package starting with base version 4.18, while GHC 9.4.8 uses base version 4.17. FWIW, ghcup (at least for me) still recommends using GHC 9.4.8, which is why I'm using it.

LeventErkok commented 4 days ago

Yeah, I stopped worrying about supporting variety of GHCs a while ago. Too much hassle.

If you send me a PR that uses some CPP magic to support both, I’ll gladly merge it.

I’m planning a release in 2-3 week’s time. It can be included in that.

eddywestbrook commented 3 days ago

Rather than making a patch, the easiest change would be to just update the metadata to those versions, to require base >= 4.18. Then cabal would just pick the right sbv version for older GHCs. As long as you don't have any users who really want newer sbv features with their older GHC versions, that should work fine. Also, then you don't have to upload new minor versions of those prior releases.

LeventErkok commented 2 days ago

I’d hate people to have a version that had a bug that’s already been fixed.

There’s a couple of other places where we do the CPP trick. I think this one is similar. I’ll release a version with this patched in a couple of weeks.

eddywestbrook commented 2 days ago

Cool, thanks Levent!