Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sparse-linear-algebra fails to build in nightly with GHC 9.4 #6774

Closed
mihaimaruseac opened this issue Nov 19, 2022 · 2 comments
Closed

sparse-linear-algebra fails to build in nightly with GHC 9.4 #6774

mihaimaruseac opened this issue Nov 19, 2022 · 2 comments

Comments

@mihaimaruseac
Copy link
Contributor

Preprocessing library for sparse-linear-algebra-0.3.1..
Building library for sparse-linear-algebra-0.3.1..
[ 8 of 21] Compiling Data.Sparse.PPrint

/var/stackage/work/unpack-dir/unpacked/sparse-linear-algebra-0.3.1-65cfbadacf3cd4fdaa89f004cf8cd509e6563e71731fdb164a516f5cd8ddefda/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 "_"
@andreasabel
Copy link
Contributor

@mihaimaruseac : Great to report, but I do not see a ping to the maintainers here, so how should they learn about it?

I reported this issue there now:

@alaendle
Copy link
Member

alaendle commented Aug 2, 2023

Closed this in favor of ocramz/sparse-linear-algebra#79 - so no need to track this also on the stackage issue list. sparse-linear-algebra will semi-automatically be re-enabled once a compatible new version/revision appears on hackage - currently it is disabled by:

        - sparse-linear-algebra < 0 # tried sparse-linear-algebra-0.3.1, but its *library* requires base >=4.7 && < 4.17 and the snapshot contains base-4.18.0.0

@alaendle alaendle closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants