Skip to content

sparse-linear-algebra 0.3 and 0.3.1 fail to build with GHC 9.4 #79

@andreasabel

Description

@andreasabel
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:

In my role as Hackage Trustee, I revised base to <4.17: https://hackage.haskell.org/package/sparse-linear-algebra-0.3.1/revisions/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions