Commits

Anonymous committed 6d4e018

Fixed to build against `cassava-0.3.0.0`. Fixes #34

`cassava-0.3.0.0` changed `encode` to accept a list instead of a vector. This
patch changes `Criterion.IO.Printf` to use the new `encode`, and also sets
a lower bound of `cassava-0.3.0.0`.

  • Participants
  • Parent commits 6396031

Comments (0)

Files changed (2)

Criterion/IO/Printf.hs

 import Text.Printf (PrintfArg)
 import qualified Data.ByteString.Lazy as B
 import qualified Data.Csv as Csv
-import qualified Data.Vector.Generic as G
 import qualified Text.Printf (HPrintfType, hPrintf)
 
 -- First item is the action to print now, given all the arguments
 writeCsv val = do
   sumOpt <- getConfigItem (getLast . cfgSummaryFile)
   case sumOpt of
-    Just fn -> liftIO . B.appendFile fn . Csv.encode . G.singleton $ val
+    Just fn -> liftIO . B.appendFile fn . Csv.encode $ [val]
     Nothing -> return ()
     base < 5,
     binary >= 0.6.3.0,
     bytestring >= 0.9 && < 1.0,
-    cassava,
+    cassava >= 0.3.0.0,
     containers,
     deepseq >= 1.1.0.0,
     directory,