Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ #206 ] Deriving FromField/ToField instances #207

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix ref tests
stevladimir committed Dec 10, 2022
commit 3df87c40b7478b20f9f4cb5143e68e5f150f5383
6 changes: 6 additions & 0 deletions benchmarks/Benchmarks.hs
Original file line number Diff line number Diff line change
@@ -20,7 +20,11 @@ import qualified Data.Vector as V

import Data.Csv
import qualified Data.Csv.Streaming as Streaming

-- This should be eventually replaced with 'cassava' version check
#ifdef GENERIC_FIELD_BENCH
import GenericFieldBench
#endif

#if !MIN_VERSION_bytestring(0,10,0)
instance NFData (B.ByteString) where
@@ -136,7 +140,9 @@ main = do
, bgroup "comparison"
[ bench "lazy-csv" $ nf LazyCsv.parseCSV csvData
]
#ifdef GENERIC_FIELD_BENCH
, genericFieldBench
#endif
]
where
decodePresidents :: BL.ByteString -> Either String (Vector President)
9 changes: 1 addition & 8 deletions benchmarks/cassava-iut.cabal
Original file line number Diff line number Diff line change
@@ -123,20 +123,13 @@ Benchmark benchmark-iut

ghc-options: -Wall -O2

cpp-options: -DGENERIC_FIELD_BENCH

Benchmark benchmark-ref
default-language: Haskell2010

Type: exitcode-stdio-1.0
Main-is: Benchmarks.hs
other-modules: GenericFieldBench
Generic.Either
Generic.Prefix
Generic.U2
Generic.U4
Generic.U8
Generic.U16
Generic.U32

-- dependencies with version constraints inherited via lib:cassava-iut
build-depends: base