packages feed

atrophy-0.2.0.0: atrophy.cabal

cabal-version: 3.0
name: atrophy
version: 0.2.0.0
synopsis: Faster integer division and modulus operations
description:
  Fast div/mod via arithmetic strength reduction.
  .
  Precompute a divisor that is only known at runtime, and divide by it with a
  multiplication and a few shifts instead of a hardware division. Also provides
  strength reduction for divisors and numerators known at compile time, which
  GHC does not do on its own, and multi-limb division and multiplication.
license: MIT
license-file: LICENSE
author: Zachary Churchill <zacharyachurchill@gmail.com>
maintainer: Zachary Churchill <zacharyachurchill@gmail.com>
copyright: 2022 Zachary Churchill
category: Math
build-type: Simple
extra-doc-files:
  CHANGELOG.md
  README.md
tested-with: GHC == 9.4.8 || == 9.10.3 || == 9.14.1

source-repository head
  type: git
  location: https://github.com/goolord/atrophy/

common warnings
  ghc-options:
    -Wall
    -Wcompat
    -Widentities
    -Wincomplete-record-updates
    -Wincomplete-uni-patterns
    -Wredundant-constraints
    -Wpartial-fields

library
  import: warnings
  exposed-modules:
    Atrophy
    Atrophy.Known
    Atrophy.LongDivision
    Atrophy.LongMultiplication
  other-modules:
    Atrophy.Internal
    Atrophy.Internal.Prim
  build-depends:
    , base >=4.17 && <5
    , deepseq >=1.4 && <1.7
    , primitive >=0.7 && <0.10
    , wide-word >=0.1 && <0.2
  hs-source-dirs: src
  default-language: GHC2021
  ghc-options: -O2

test-suite atrophy-test
  import: warnings
  type: exitcode-stdio-1.0
  hs-source-dirs: tests
  main-is: Main.hs
  default-language: GHC2021
  ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N
  build-depends:
    , atrophy
    , base
    , primitive
    , QuickCheck >=2.14
    , tasty
    , tasty-hunit
    , tasty-quickcheck
    , wide-word

benchmark atrophy-bench
  import: warnings
  type: exitcode-stdio-1.0
  hs-source-dirs: bench
  main-is: Main.hs
  default-language: GHC2021
  ghc-options: -O2 -rtsopts
  build-depends:
    , atrophy
    , base
    , deepseq
    , primitive
    , random >=1.2
    , tasty-bench >=0.3
    , wide-word