diff --git a/crc32c.cabal b/crc32c.cabal index ecd6d48..f2d08c0 100644 --- a/crc32c.cabal +++ b/crc32c.cabal @@ -1,9 +1,13 @@ cabal-version: 2.2 +-- This file has been generated from package.yaml by hpack version 0.36.0. +-- +-- see: https://github.com/sol/hpack + name: crc32c -version: 0.2.0 -description: Haskell bindings for crc32c +version: 0.2.1 synopsis: crc32c +description: Haskell bindings for crc32c category: FFI, Raw homepage: https://github.com/leptonyu/crc32c#readme author: Daniel YU @@ -14,7 +18,6 @@ license-file: LICENSE build-type: Simple extra-source-files: README.md - ChangeLog.md include/LICENSE include/crc32c_arm64.h include/crc32c_arm64_check.h @@ -30,49 +33,48 @@ extra-source-files: library exposed-modules: Data.Digest.CRC32C + other-modules: + Data.Digest.CRC32C.Internal hs-source-dirs: src - build-depends: - base >=4.9 && <5 - , bytestring >=0.11.5 - default-language: Haskell2010 - + cxx-options: -std=c++11 include-dirs: include - cxx-sources: + c-sources: include/crc32c.cc include/crc32c_arm64.cc include/crc32c_portable.cc include/crc32c_sse42.cc extra-libraries: stdc++ - cxx-options: -std=c++11 - if (arch(x86_64) && !os(windows)) + build-tools: + c2hs + build-depends: + base >=4.9 && <5 + , bytestring >=0.11.5 + default-language: Haskell2010 + if arch(x86_64) && !os(windows)) cxx-options: -DHAVE_SSE42=1 -msse4.2 - if arch(arm) - cxx-options: -DHAVE_ARM64_CRC32C=1 + else + if arch(arm) + cxx-options: -DHAVE_ARM64_CRC32C=1 + else + cxx-options: -DHAVE_ARM64_CRC32C=0 test-suite crc32c-test type: exitcode-stdio-1.0 main-is: Spec.hs + other-modules: + Paths_crc32c + autogen-modules: + Paths_crc32c hs-source-dirs: test build-depends: QuickCheck - , base - , bytestring + , base >=4.9 && <5 + , bytestring >=0.11.5 && <0.12 , crc32c , hspec , hspec-core default-language: Haskell2010 - -benchmark crc32c-bench - type: exitcode-stdio-1.0 - main-is: Bench.hs - hs-source-dirs: bench - build-depends: - base - , bytestring - , crc32c - , criterion - default-language: Haskell2010 diff --git a/package.yaml b/package.yaml index 7704e47..138ba99 100644 --- a/package.yaml +++ b/package.yaml @@ -1,9 +1,9 @@ name: crc32c -version: 0.2.0 -synopsis: Haskell bindings for crc32c -# description: +version: 0.2.1 +synopsis: crc32c +description: Haskell bindings for crc32c homepage: https://github.com/leptonyu/crc32c#readme -license: BSD3 +license: BSD-3-Clause author: Daniel YU maintainer: leptonyu@gmail.com copyright: (c) Daniel YU @@ -24,22 +24,23 @@ library: source-dirs: src dependencies: - base >= 4.9 && < 5 - - bytestring >=0.10.8.2 + - bytestring >=0.11.5 include-dirs: - include c-sources: - include/*.cc + cxx-options: -std=c++11 when: - - condition: arch(x86_64) + - condition: arch(x86_64) && !os(windows)) then: - cc-options: -std=c++11 -D__HAVE_SSE42=1 -D__HAVE_ARM64_CRC32C=0 -msse4.2 + cxx-options: -DHAVE_SSE42=1 -msse4.2 else: when: - condition: arch(arm) then: - cc-options: -std=c++11 -D__HAVE_SSE42=0 -D__HAVE_ARM64_CRC32C=1 + cxx-options: -DHAVE_ARM64_CRC32C=1 else: - cc-options: -std=c++11 -D__HAVE_SSE42=0 -D__HAVE_ARM64_CRC32C=0 + cxx-options: -DHAVE_ARM64_CRC32C=0 tests: crc32c-test: @@ -47,7 +48,7 @@ tests: main: Spec.hs dependencies: - base >= 4.9 && < 5 - - bytestring >=0.10.8.2 && <0.12 + - bytestring >=0.11.5 && <0.12 - crc32c - hspec - hspec-core diff --git a/stack.yaml b/stack.yaml index 0b04d30..8285e0a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-20.11 -compiler: ghc-9.2.5 +resolver: lts-22.11 +compiler: ghc-9.4.8 packages: - .