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
240 stars 33 forks source link

Update minimum base dependency to 4.16 #656

Closed lsrcz closed 1 year ago

lsrcz commented 1 year ago

This pull request updates the minimum base dependency to 4.17 (GHC 9.4), which resolves issue #655. I have confirmed that the current version of the code builds successfully with GHC 9.4, but not with earlier versions such as GHC 9.2.

The reason for this is that the commit d09d300 introduced equality constraints, which require either the GADTs or TypeFamilies extension in earlier GHC versions. If you prefer, I can also fix the code by adding the extensions to use base version 4.16 instead, and ensure compatibility with GHC 9.2. Let me know your thoughts on this.

LeventErkok commented 1 year ago

@lsrcz Thanks! It’d be great to support ghc 9.2 indeed. If you can do the mods to support that, it’s really help.

I’ll wait for those changes before doing the merge.

lsrcz commented 1 year ago

@LeventErkok Sure! I've added the extensions, and changed the base dependency to 4.16. Please review it.

LeventErkok commented 1 year ago

Should those pragmas be protected by:

#if !MIN_VERSION_base(4,17,0)
...
#endif

(or similar?) to make sure hlint doesn't complain about them? I'm not sure if !MIN_VERSION_base is a valid construct, if not, perhaps it can be put into the #else clause.

lsrcz commented 1 year ago

I did not see hlint warnings about the redundant pragmas. Did you get the warnings on your system?

LeventErkok commented 1 year ago

I didn't actually try. But I assumed there would be, since we don't need these to compile with GHC 9.6. Perhaps that should be a bug report on hlint itself then.

But I'll go ahead and merge this as is, and will deal with any hlint issues later. Thanks for the contribution!