-- This file has been generated from package.yaml by hpack version 0.18.1.
--
-- see: https://github.com/sol/hpack

name:           hw-dsv
version:        0.2.2
synopsis:       Unbelievably fast streaming DSV file parser
description:    Please see the README on Github at <https://github.com/haskell-works/hw-dsv#readme>
category:       Text, Web, CSV
homepage:       https://github.com/haskell-works/hw-dsv#readme
bug-reports:    https://github.com/haskell-works/hw-dsv/issues
author:         John Ky
maintainer:     newhoggy@gmail.com
copyright:      2018 John Ky
license:        BSD3
license-file:   LICENSE
tested-with:    GHC == 8.4.3, GHC == 8.2.2, GHC == 8.0.2, GHC == 7.10.3
build-type:     Simple
cabal-version:  >= 1.10

extra-source-files:
    cbits/simd.h
    ChangeLog.md
    data/bench/data-0001000.csv
    README.md

source-repository head
  type: git
  location: https://github.com/haskell-works/hw-dsv

flag avx2
  description: Enable avx2 instruction set
  manual: False
  default: False

flag bmi2
  description: Enable bmi2 instruction set
  manual: False
  default: False

flag sse42
  description: Enable SSE 4.2 optimisations.
  manual: False
  default: True

library
  hs-source-dirs:
      src
  ghc-options: -O2 -Wall
  include-dirs:
      cbits
  c-sources:
      cbits/simd.c
  build-depends:
      base                  >= 4.7      && < 5
    , bits-extra            >= 0.0.1.2  && < 0.1
    , bytestring            >= 0.10     && < 0.11
    , deepseq               >= 1.4      && < 1.5
    , hw-bits               >= 0.7.0.2  && < 0.8
    , hw-rankselect         >= 0.12.0.2 && < 0.13
    , hw-rankselect-base    >= 0.3.2.0  && < 0.4
    , hw-prim               >= 0.6.2.0  && < 0.7
    , hw-simd               >= 0.0.0.3  && < 0.1
    , vector                >= 0.12.0.1 && < 0.13
  build-tools:
      c2hs
  if flag(sse42)
    ghc-options: -msse4.2
    cc-options: -msse4.2
  if flag(bmi2)
    cc-options: -mbmi2 -DBMI2_ENABLED
  if (flag(bmi2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
  if flag(avx2)
    cc-options: -mavx2 -DAVX2_ENABLED
  if (flag(avx2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
    cpp-options: -DBMI2_ENABLED -DAVX2_ENABLED
  if (impl(ghc >=8.0.1))
    ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints
  if (!impl(ghc >=8.0.1))
    build-depends:
        transformers          >= 0.4        && < 0.6
      , semigroups            >= 0.8.4      && < 0.19
  exposed-modules:
      HaskellWorks.Data.Dsv.Internal.Bits
      HaskellWorks.Data.Dsv.Internal.Broadword
      HaskellWorks.Data.Dsv.Internal.ByteString
      HaskellWorks.Data.Dsv.Internal.ByteString.Lazy
      HaskellWorks.Data.Dsv.Internal.Char
      HaskellWorks.Data.Dsv.Internal.Char.Word64
      HaskellWorks.Data.Dsv.Lazy.Cursor
      HaskellWorks.Data.Dsv.Lazy.Cursor.Internal
      HaskellWorks.Data.Dsv.Lazy.Cursor.Type
      HaskellWorks.Data.Dsv.Strict.Cursor
      HaskellWorks.Data.Dsv.Strict.Cursor.Internal
      HaskellWorks.Data.Dsv.Strict.Cursor.Internal.Reference
      HaskellWorks.Data.Dsv.Strict.Cursor.Type
  other-modules:
      Paths_hw_dsv
  default-language: Haskell2010

executable hw-dsv
  main-is: Main.hs
  hs-source-dirs:
      app
  ghc-options: -O2 -Wall -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base                  >= 4.7      && < 5
    , bits-extra            >= 0.0.1.2  && < 0.1
    , bytestring            >= 0.10     && < 0.11
    , deepseq               >= 1.4      && < 1.5
    , hw-bits               >= 0.7.0.2  && < 0.8
    , hw-rankselect         >= 0.12.0.2 && < 0.13
    , hw-rankselect-base    >= 0.3.2.0  && < 0.4
    , hw-prim               >= 0.6.2.0  && < 0.7
    , hw-simd               >= 0.0.0.3  && < 0.1
    , vector                >= 0.12.0.1 && < 0.13
    , hw-dsv
    , hedgehog                >= 0.5        && < 0.7
    , lens                    >= 4.15       && < 5
    , optparse-applicative    >= 0.13       && < 0.15
    , resourcet               >= 1.1        && < 1.3
  if flag(sse42)
    ghc-options: -msse4.2
    cc-options: -msse4.2
  if flag(bmi2)
    cc-options: -mbmi2 -DBMI2_ENABLED
  if (flag(bmi2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
  if flag(avx2)
    cc-options: -mavx2 -DAVX2_ENABLED
  if (flag(avx2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
    cpp-options: -DBMI2_ENABLED -DAVX2_ENABLED
  if (impl(ghc >=8.0.1))
    ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints
  if (!impl(ghc >=8.0.1))
    build-depends:
        transformers          >= 0.4        && < 0.6
      , semigroups            >= 0.8.4      && < 0.19
  other-modules:
      App.Char
      App.Commands
      App.Commands.CreateIndex
      App.Commands.Generate
      App.Commands.IndexWord8s
      App.Commands.Options.Type
      App.Commands.QueryLazy
      App.Commands.QueryStrict
      App.Gen
      App.IO
      App.Lens
  default-language: Haskell2010

test-suite hw-dsv-space
  type: exitcode-stdio-1.0
  main-is: Space.hs
  hs-source-dirs:
      weigh
  ghc-options: -O2 -Wall
  build-depends:
      base                  >= 4.7      && < 5
    , bits-extra            >= 0.0.1.2  && < 0.1
    , bytestring            >= 0.10     && < 0.11
    , deepseq               >= 1.4      && < 1.5
    , hw-bits               >= 0.7.0.2  && < 0.8
    , hw-rankselect         >= 0.12.0.2 && < 0.13
    , hw-rankselect-base    >= 0.3.2.0  && < 0.4
    , hw-prim               >= 0.6.2.0  && < 0.7
    , hw-simd               >= 0.0.0.3  && < 0.1
    , vector                >= 0.12.0.1 && < 0.13
    , cassava               >= 0.5.1.0    && < 0.6
    , hw-dsv
    , weigh                 >= 0.0.6      && < 0.1
  if flag(sse42)
    ghc-options: -msse4.2
    cc-options: -msse4.2
  if flag(bmi2)
    cc-options: -mbmi2 -DBMI2_ENABLED
  if (flag(bmi2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
  if flag(avx2)
    cc-options: -mavx2 -DAVX2_ENABLED
  if (flag(avx2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
    cpp-options: -DBMI2_ENABLED -DAVX2_ENABLED
  if (impl(ghc >=8.0.1))
    ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints
  if (!impl(ghc >=8.0.1))
    build-depends:
        transformers          >= 0.4        && < 0.6
      , semigroups            >= 0.8.4      && < 0.19
  default-language: Haskell2010

test-suite hw-dsv-test
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  hs-source-dirs:
      test
  ghc-options: -O2 -Wall -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base                  >= 4.7      && < 5
    , bits-extra            >= 0.0.1.2  && < 0.1
    , bytestring            >= 0.10     && < 0.11
    , deepseq               >= 1.4      && < 1.5
    , hw-bits               >= 0.7.0.2  && < 0.8
    , hw-rankselect         >= 0.12.0.2 && < 0.13
    , hw-rankselect-base    >= 0.3.2.0  && < 0.4
    , hw-prim               >= 0.6.2.0  && < 0.7
    , hw-simd               >= 0.0.0.3  && < 0.1
    , vector                >= 0.12.0.1 && < 0.13
    , directory               >= 1.2.2      && < 1.4
    , hw-dsv
    , hedgehog                >= 0.5        && < 0.7
    , hspec                   >= 2.4        && < 3
    , hw-hspec-hedgehog       >= 0.1.0.4    && < 0.2
    , text                    >= 1.2.2      && < 2.0
  if flag(sse42)
    ghc-options: -msse4.2
    cc-options: -msse4.2
  if flag(bmi2)
    cc-options: -mbmi2 -DBMI2_ENABLED
  if (flag(bmi2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
  if flag(avx2)
    cc-options: -mavx2 -DAVX2_ENABLED
  if (flag(avx2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
    cpp-options: -DBMI2_ENABLED -DAVX2_ENABLED
  if (impl(ghc >=8.0.1))
    ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints
  if (!impl(ghc >=8.0.1))
    build-depends:
        transformers          >= 0.4        && < 0.6
      , semigroups            >= 0.8.4      && < 0.19
  other-modules:
      HaskellWorks.Data.Dsv.BroadwordSpec
      HaskellWorks.Data.Dsv.Gen
      HaskellWorks.Data.Dsv.Lazy.CursorSpec
      HaskellWorks.Data.Dsv.Strict.Cursor.InternalSpec
      HaskellWorks.Data.DsvSpec
  default-language: Haskell2010

benchmark bench
  type: exitcode-stdio-1.0
  main-is: Main.hs
  hs-source-dirs:
      bench
  ghc-options: -O2 -Wall -msse4.2
  build-depends:
      base                  >= 4.7      && < 5
    , bits-extra            >= 0.0.1.2  && < 0.1
    , bytestring            >= 0.10     && < 0.11
    , deepseq               >= 1.4      && < 1.5
    , hw-bits               >= 0.7.0.2  && < 0.8
    , hw-rankselect         >= 0.12.0.2 && < 0.13
    , hw-rankselect-base    >= 0.3.2.0  && < 0.4
    , hw-prim               >= 0.6.2.0  && < 0.7
    , hw-simd               >= 0.0.0.3  && < 0.1
    , vector                >= 0.12.0.1 && < 0.13
    , cassava               >= 0.5.1.0    && < 0.6
    , criterion             >= 1.4.1.0    && < 1.5
    , directory             >= 1.3.1.5    && < 1.4
    , hw-dsv
    , mmap                  >= 0.5.9      && < 0.6
  if flag(sse42)
    ghc-options: -msse4.2
    cc-options: -msse4.2
  if flag(bmi2)
    cc-options: -mbmi2 -DBMI2_ENABLED
  if (flag(bmi2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
  if flag(avx2)
    cc-options: -mavx2 -DAVX2_ENABLED
  if (flag(avx2)) && (impl(ghc >=8.4.1))
    ghc-options: -mbmi2 -msse4.2
    cpp-options: -DBMI2_ENABLED -DAVX2_ENABLED
  if (impl(ghc >=8.0.1))
    ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints
  if (!impl(ghc >=8.0.1))
    build-depends:
        transformers          >= 0.4        && < 0.6
      , semigroups            >= 0.8.4      && < 0.19
  default-language: Haskell2010