sparse-linear-algebra 0.3 and 0.3.1 fail to build with GHC 9.4
src/Data/Sparse/PPrint.hs:60:29: error:
• Could not deduce (RealFloat a) arising from a use of ‘f’
from the context: (PrintfArg a, Epsilon a, Epsilon (Complex a),
Ord a)
bound by the type signature for:
printCN :: forall a.
(PrintfArg a, Epsilon a, Epsilon (Complex a), Ord a) =>
Int -> Int -> PPrintOptions -> [Complex a] -> String
at src/Data/Sparse/PPrint.hs:(58,1)-(59,57)
Possible fix:
add (RealFloat a) to the context of
the type signature for:
printCN :: forall a.
(PrintfArg a, Epsilon a, Epsilon (Complex a), Ord a) =>
Int -> Int -> PPrintOptions -> [Complex a] -> String
• In the third argument of ‘printNpad’, namely ‘f’
In the expression: printNpad l n f
In an equation for ‘printCN’:
printCN l n
= printNpad l n f
where
f o x
| nearZero (re x) && isNz (imagPart x)
= printf (prepD o (imagPart x) ++ "i") (aim x)
| nearZero (imagPart x) && isNz (re x)
= printf (prepD o (realPart x)) (re x)
| isNz x = printf (prepC o x) (re x) (aim x)
| otherwise = printf "_"
|
60 | printCN l n = printNpad l n f where
Lifted from:
- https://github.com/commercialhaskell/stackage/issues/6774
In my role as Hackage Trustee, I revised base to <4.17: https://hackage.haskell.org/package/sparse-linear-algebra-0.3.1/revisions/
I have a branch that compiles with ghc 9.4.4
- Added RealFloat constraint to fix above error
- Added TypeOperators extension to one file to silence some warnings
- Added a cabal.project file to allow cabal solution. Not sure if this is necessary. Would you like to me to make a PR? Branch is here: https://github.com/adamConnerSax/sparse-linear-algebra/tree/GHC94
@adamConnerSax : There has been no activity on the code here for 3 years now, judging from the commits, so I would be afraid the PR would just be stuck here. Maybe you want to take over this package? See procedure at: https://wiki.haskell.org/Taking_over_a_package
In hindsight, I should have kept this off hackage, but that can't be changed now.
While the scope of this library is valid, the internals are IMO pathologically inefficient and deserve careful benchmarking and possibly a redesign.
I don't have time for such a redesign anymore and I'd be happy to hand the library over.
On Thu, 29 Dec 2022 at 08:04, Andreas Abel @.***> wrote:
@adamConnerSax https://github.com/adamConnerSax : There has been no activity on the code here for 3 years now, judging from the commits, so I would be afraid the PR would just be stuck here. Maybe you want to take over this package? See procedure at: https://wiki.haskell.org/Taking_over_a_package
— Reply to this email directly, view it on GitHub https://github.com/ocramz/sparse-linear-algebra/issues/79#issuecomment-1367113558, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBDKE276FBYVVWABR7IULWPUZY7ANCNFSM6AAAAAATKHLPLM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@ocramz : Thanks for chiming in! You can facilitate the takeover (if @adamConnerSax agrees) by:
- Adding @adamConnerSax by his Hackage ID to https://hackage.haskell.org/package/sparse-linear-algebra/maintainers/
- Giving him write access to this repo.
The second step is optional but I supposed would be easiest because maintaining on a fork is troublesome on github. (An alternative would be to transfer this repo e.g. to a new dedicated github organisation.)
Btw, here is a list of (some of) the public users of this library: https://packdeps.haskellers.com/reverse/sparse-linear-algebra
I'm going to respectfully decline.
Given @ocramz comment above and the fact that I have no experience with sparse-matrix code except as an occasional user, I think I will shift away from this library (I wasn't using it for much except a storage format). I do think sparse-matrix libs are a gap in the Haskell numerics ecosystem but I am not going to be able to move this one forward.
Maybe @GregorySchwartz would be interested to keep this project alive?
Unfortunately I do not have time, but this library has a great API so I would love for it to be supported still.
@GregorySchwartz @adamConnerSax Maybe you can recruit someone, but I do not think this library has a ton of users. Try to search through the maintainers of the packages that depend on sparse-linear-algebra (see my link above).