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

Build fails on GHC 9.8.1 #674

Closed noughtmare closed 9 months ago

noughtmare commented 9 months ago

I'm getting this error:

Data/SBV/Core/AlgReals.hs:101:22: error: [GHC-63394] [-Wx-partial, -Werror=x-partial]
    In the use of ‘head’
    (imported from Prelude, but defined in GHC.List):
    "This is a partial function, it throws an error on empty lists. Use pattern matching or Data.List.uncons instead. Consider refactoring to use Data.List.NonEmpty."
    |
101 |      where c  = -1 * head ([k | (k, 0) <- xs] ++ [0])
    |                      ^^^^
noughtmare commented 9 months ago

Nevermind, this is already fixed on master.

noughtmare commented 9 months ago

But maybe a tighter base upper bound should be added on the existing version on Hackage?

LeventErkok commented 9 months ago

I'm waiting for a few fixes to z3 to become available; after that there'll be a new release; hopefully within a few weeks.

noughtmare commented 9 months ago

It still would be nice to make a Hackage revision of the existing versions with a tighter upper bound on base. Otherwise cabal might still try to fall back on broken versions.

LeventErkok commented 9 months ago

sure.. can you go ahead and make the revision on hackage? I'm not exactly sure what the steps are for doing so.

noughtmare commented 9 months ago

Only maintainers and Hackage trustees can do it.

You'd need to go to https://hackage.haskell.org/package/sbv/maintain and look under the heading "Cabal file metadata" and click on one of the versions of the package listed there. Then you'll see a text area to edit the cabal file where you can change the upper bound.

But really you'd have to do this for all versions to avoid cabal falling back on older versions. That could be a bit of effort, I don't know if that is worth it.

@Bodigrim you're a trustee and have contributed to sbv before. What do you think the best course of action is?

Bodigrim commented 9 months ago

But really you'd have to do this for all versions to avoid cabal falling back on older versions. That could be a bit of effort, I don't know if that is worth it.

Certainly worth doing. If manual update is a bottleneck, https://hackage.haskell.org/package/hackage-cli allows for bulk update of all Cabal files.

Bodigrim commented 9 months ago

Bear with me, I'll make the revisions...

LeventErkok commented 9 months ago

@Bodigrim Thanks!

Bodigrim commented 9 months ago

Should be better now. @noughtmare could you please check?

noughtmare commented 9 months ago

@Bodigrim, it works. Cabal now fails when trying to resolve dependencies. Unfortunately the error message is not very helpful, but that's on cabal.

LeventErkok commented 9 months ago

Thanks @noughtmare @Bodigrim Much appreciated.