packages feed

lz4-hs-0.1.2.0: lz4-hs.cabal

cabal-version:   1.18
name:            lz4-hs
version:         0.1.2.0
license:         BSD3
license-file:    LICENSE
copyright:       Copyright: (c) 2020 Vanessa McHale
maintainer:      vamchale@gmail.com
author:          Vanessa McHale
synopsis:        lz4 bindings for Haskell
description:     lz4 streaming library via ByteString
category:        Codec, Compression, FFI
build-type:      Simple
extra-doc-files:
    README.md
    CHANGELOG.md

source-repository head
    type:     darcs
    location: https://hub.darcs.net/vmchale/lz4

flag cross
    description: Set this flag if cross-compiling
    default:     False
    manual:      True

library
    exposed-modules:  Codec.Lz4
    c-sources:
        cbits/lz4.c
        cbits/lz4frame.c
        cbits/lz4hc.c
        cbits/xxhash.c

    hs-source-dirs:   src
    other-modules:    Codec.Lz4.Foreign
    default-language: Haskell2010
    include-dirs:     cbits
    install-includes:
        cbits/lz4.h cbits/lz4frame.h cbits/lz4hc.h cbits/xxhash.h

    ghc-options:      -Wall
    build-depends:
        base >=4.8 && <5,
        bytestring -any

    if !flag(cross)
        build-tool-depends: c2hs:c2hs >=0.28.6

    if impl(ghc >=8.0)
        ghc-options:
            -Wincomplete-uni-patterns -Wincomplete-record-updates
            -Wredundant-constraints

    if impl(ghc >=8.4)
        ghc-options: -Wmissing-export-lists

test-suite lz4-test
    type:             exitcode-stdio-1.0
    main-is:          Spec.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    ghc-options:      -threaded -rtsopts -with-rtsopts=-N -Wall
    build-depends:
        base -any,
        lz4-hs -any,
        tasty -any,
        tasty-hunit -any,
        bytestring -any

    if impl(ghc >=8.0)
        ghc-options:
            -Wincomplete-uni-patterns -Wincomplete-record-updates
            -Wredundant-constraints -Widentities

    if impl(ghc >=8.4)
        ghc-options: -Wmissing-export-lists

    if impl(ghc >=8.2)
        ghc-options: -Wcpp-undef

benchmark lz4-mem
    type:             exitcode-stdio-1.0
    main-is:          Mem.hs
    hs-source-dirs:   mem
    default-language: Haskell2010
    ghc-options:      -Wall
    build-depends:
        base -any,
        lz4-hs -any,
        bytestring -any,
        filepath -any,
        temporary -any

    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates

benchmark lz4-bench
    type:             exitcode-stdio-1.0
    main-is:          Bench.hs
    hs-source-dirs:   bench
    default-language: Haskell2010
    ghc-options:      -Wall
    build-depends:
        base -any,
        lz4-hs -any,
        criterion -any,
        bytestring -any,
        temporary -any,
        filepath -any

    if impl(ghc >=8.0)
        ghc-options:
            -Wincomplete-uni-patterns -Wincomplete-record-updates
            -Wredundant-constraints -Widentities

    if impl(ghc >=8.4)
        ghc-options: -Wmissing-export-lists

    if impl(ghc >=8.2)
        ghc-options: -Wcpp-undef