Commits

Bryan O'Sullivan  committed b1e9cb2

Fix compatibility with Chart >= 0.14

  • Participants
  • Parent commits 5fe418e

Comments (0)

Files changed (1)

File Criterion/Plot.hs

     , plotWith
     ) where
 
+import Control.Monad (void)
 import Control.Monad.Trans (liftIO)
 import Criterion.Config
 import Criterion.Monad (Criterion, getConfigItem)
       putRow h [show x, show y]
 
 #ifdef HAVE_CHART
-plotTiming (PDF x y) desc times =
+plotTiming (PDF x y) desc times = void $
   renderableToPDFFile (renderTiming desc times) x y
                       (mangle $ printf "%s timings %dx%d.pdf" desc x y)
 
-plotTiming (PNG x y) desc times =
+plotTiming (PNG x y) desc times = void $
   renderableToPNGFile (renderTiming desc times) x y
                       (mangle $ printf "%s timings %dx%d.png" desc x y)
 
-plotTiming (SVG x y) desc times =
+plotTiming (SVG x y) desc times = void $
   renderableToSVGFile (renderTiming desc times) x y
                       (mangle $ printf "%s timings %dx%d.svg" desc x y)
 
-#ifdef HAVE_GTK
-plotTiming (Window x y) desc times =
+# ifdef HAVE_GTK
+plotTiming (Window x y) desc times = void $
   renderableToWindow (renderTiming desc times) x y
-#endif
+# endif
 #endif
 
 plotTiming output _desc _times =
       putRow h [show x, show y]
 
 #ifdef HAVE_CHART
-plotKDE (PDF x y) desc exs points pdf =
+plotKDE (PDF x y) desc exs points pdf = void $
   renderableToPDFFile (renderKDE desc exs points pdf) x y
                       (mangle $ printf "%s densities %dx%d.pdf" desc x y)
 
-plotKDE (PNG x y) desc exs points pdf =
+plotKDE (PNG x y) desc exs points pdf = void $
   renderableToPNGFile (renderKDE desc exs points pdf) x y
                       (mangle $ printf "%s densities %dx%d.png" desc x y)
 
-plotKDE (SVG x y) desc exs points pdf =
+plotKDE (SVG x y) desc exs points pdf = void $
   renderableToSVGFile (renderKDE desc exs points pdf) x y
                       (mangle $ printf "%s densities %dx%d.svg" desc x y)
 
-#ifdef HAVE_GTK
-plotKDE (Window x y) desc exs points pdf =
+# ifdef HAVE_GTK
+plotKDE (Window x y) desc exs points pdf = void $
     renderableToWindow (renderKDE desc exs points pdf) x y
-#endif
+# endif
 #endif
 
 plotKDE output _desc _exs _points _pdf =