Reputation: 927
I have the following Haskell code with me.
import Graphics.Rendering.Chart.Simple
range, data1, data2 :: [Double]
range = [0..10]
data1 = [1,4,2,3,4,5,2,3,4,1]
data2 = [1,2,2,7,4,3,7,1,3,1]
main = plotPDF "chart-example.pdf" range data1 Solid data2 Solid
I get the below error on executing it. anyone who can help me to resolve it.
Upvotes: 1
Views: 197
Reputation: 791
The issue is fixed in the new 1.2 release of the library. The Simple API (which this example requires) is now in it's own package: Chart-simple-1.2.
Upvotes: 1
Reputation: 12000
Chart-1.1
seems to be broken. The only instance of PlotPDFType
is
instance (PlotArg a, PlotPDFType r) => PlotPDFType (a -> r)
This is a recursive instance, but there's no base case!
The IO
instance is still there in version 0.17. Maybe you can go back to that version. And you should file a bug here: https://github.com/timbod7/haskell-chart/issues
Upvotes: 2