cabal-version: 3.4
name: dataframe-fastcsv
version: 1.3.0.0
synopsis: SIMD-accelerated CSV reader for the dataframe library.
description: A fast, SIMD-accelerated CSV/TSV reader using memory-mapped I/O
and carryless multiplication for quote handling. Supports AVX2
(x86-64) and ARM NEON with fallback to a pure Haskell state machine.
bug-reports: https://github.com/mchav/dataframe/issues
license: MIT
license-file: LICENSE
author: Michael Chavinda
maintainer: mschavinda@gmail.com
copyright: (c) 2024-2026 Michael Chavinda
category: Data
tested-with: GHC ==9.4.8 || ==9.6.7 || ==9.8.4 || ==9.10.3 || ==9.12.2
extra-source-files: cbits/process_csv.h
tests/data/unstable_csv/*.csv
tests/data/unstable_csv/*.tsv
common warnings
ghc-options:
-Wincomplete-patterns
-Wincomplete-uni-patterns
-Wunused-imports
-Wunused-packages
-Wunused-local-binds
-- Turn on AddressSanitizer + UndefinedBehaviorSanitizer for both the
-- C parser and GHC-managed memory. Used by CI and during local
-- hardening passes:
--
-- cabal test -fasan dataframe-fastcsv:test:tests
--
-- Requires a clang / gcc that supports the sanitizers at both compile
-- and link time. Slow; off by default.
flag asan
default: False
manual: True
description: Build the C parser with AddressSanitizer + UBSan instrumentation.
library
import: warnings
default-extensions: Strict
exposed-modules: DataFrame.IO.CSV.Fast
other-modules: DataFrame.IO.CSV.Fast.Columns
DataFrame.IO.CSV.Fast.Core
DataFrame.IO.CSV.Fast.Index
DataFrame.IO.CSV.Fast.IndexPar
DataFrame.IO.CSV.Fast.Parallel
DataFrame.IO.CSV.Fast.Passes
DataFrame.IO.CSV.Fast.Slice
DataFrame.IO.CSV.Fast.TextMerge
DataFrame.IO.CSV.Fast.Workers
build-depends: base >= 4 && < 5,
bytestring >= 0.11 && < 0.14,
containers >= 0.6.7 && < 0.10,
dataframe-core >= 2.1 && < 2.2,
dataframe-csv >= 2.1 && < 2.2,
dataframe-operations >= 2.1 && < 2.2,
dataframe-parsing >= 2.1 && < 2.2,
dataframe-parsing >= 2.1 && < 2.2,
mmap >= 0.5.8 && < 0.7,
text >= 2.1 && < 3,
time >= 1.12 && < 2,
vector >= 0.13 && < 0.15
hs-source-dirs: src
c-sources: cbits/process_csv.c
include-dirs: cbits
includes: process_csv.h
install-includes: process_csv.h
cc-options: -Wall -Wextra -fno-strict-aliasing
default-language: Haskell2010
if flag(asan)
cc-options: -O1 -g -fsanitize=address,undefined -fno-omit-frame-pointer
ld-options: -fsanitize=address,undefined
test-suite tests
import: warnings
type: exitcode-stdio-1.0
main-is: Main.hs
-- -threaded so the chunk-parallel path actually runs on multiple
-- capabilities (the library itself does not choose the RTS).
ghc-options: -threaded -rtsopts "-with-rtsopts=-N"
other-modules: Operations.ChunkParallel
Operations.ReadCsv
Operations.TypedExtraction
Properties.Csv
build-depends: base >= 4 && < 5,
containers >= 0.6.7 && < 0.10,
dataframe-core >= 2.1 && < 2.2,
dataframe-csv >= 2.1 && < 2.2,
dataframe-fastcsv,
dataframe-operations >= 2.1 && < 2.2,
dataframe-parsing >= 2.1 && < 2.2,
directory >= 1.3.0.0 && < 2,
HUnit >= 1.6 && < 1.8,
QuickCheck >= 2 && < 3,
text >= 2.1 && < 3,
time >= 1.12 && < 2,
vector >= 0.13 && < 0.15
hs-source-dirs: tests
default-language: Haskell2010
if flag(asan)
ld-options: -fsanitize=address,undefined