-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
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
Labels
No labels