File: no-js-chart

package info (click to toggle)
haskell-criterion 1.6.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 360 kB
  • sloc: haskell: 1,891; javascript: 811; makefile: 3
file content (50 lines) | stat: -rw-r--r-- 1,809 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Index: b/Criterion/EmbeddedData.hs
===================================================================
--- a/Criterion/EmbeddedData.hs
+++ b/Criterion/EmbeddedData.hs
@@ -20,10 +20,9 @@ module Criterion.EmbeddedData
 import Data.ByteString (ByteString)
 import Data.FileEmbed (embedDir, embedFile)
 import Language.Haskell.TH.Syntax (runIO)
-import qualified Language.Javascript.Chart as Chart
 
 dataFiles :: [(FilePath, ByteString)]
 dataFiles = $(embedDir "templates")
 
 chartContents :: ByteString
-chartContents = $(embedFile =<< runIO (Chart.file Chart.Chart))
+chartContents = $(embedFile "/usr/share/javascript/chart.js/Chart.js")
Index: b/Criterion/Report.hs
===================================================================
--- a/Criterion/Report.hs
+++ b/Criterion/Report.hs
@@ -66,8 +66,6 @@ import qualified Data.Vector.Unboxed as
 import Criterion.EmbeddedData (dataFiles, chartContents)
 import qualified Data.ByteString.Lazy as BL
 import qualified Data.Text.Encoding as TE
-#else
-import qualified Language.Javascript.Chart as Chart
 #endif
 
 #if MIN_VERSION_aeson(2,0,0)
@@ -181,7 +179,7 @@ formatReport reports templateName = do
 #if defined(EMBED)
     chartFileContents        = pure $ TE.decodeUtf8 chartContents
 #else
-    chartFileContents        = T.readFile =<< Chart.file Chart.Chart
+    chartFileContents        = T.readFile "/usr/share/javascript/chart.js/Chart.js"
 #endif
 
     readDataFile :: FilePath -> IO T.Text
Index: b/criterion.cabal
===================================================================
--- a/criterion.cabal
+++ b/criterion.cabal
@@ -101,7 +101,6 @@ library
     filepath,
     Glob >= 0.7.2,
     microstache >= 1.0.1 && < 1.1,
-    js-chart >= 2.9.4 && < 3,
     mtl >= 2,
     mwc-random >= 0.8.0.3,
     optparse-applicative >= 0.18 && < 0.19,