packages feed

poly-0.5.1.0: poly.cabal

name: poly
version: 0.5.1.0
synopsis: Polynomials
description:
  Polynomials backed by `Vector`s.
homepage: https://github.com/Bodigrim/poly#readme
license: BSD3
license-file: LICENSE
author: Andrew Lelechenko
maintainer: andrew.lelechenko@gmail.com
copyright: 2019-2020 Andrew Lelechenko
category: Math, Numerical
build-type: Simple
cabal-version: 2.0
tested-with: GHC ==8.6.5 GHC ==8.8.4 GHC ==8.10.7 GHC ==9.0.2 GHC ==9.2.5 GHC ==9.4.4
extra-source-files:
  changelog.md
  README.md

source-repository head
  type: git
  location: https://github.com/Bodigrim/poly

flag sparse
  description:
    Enable sparse and multivariate polynomials, incurring a larger dependency footprint.
  default: True
  manual: True

library
  hs-source-dirs: src
  exposed-modules:
    Data.Poly
    Data.Poly.Laurent
    Data.Poly.Semiring
    Data.Poly.Orthogonal

  if flag(sparse)
    exposed-modules:
      Data.Poly.Sparse
      Data.Poly.Sparse.Laurent
      Data.Poly.Sparse.Semiring

      Data.Poly.Multi
      Data.Poly.Multi.Laurent
      Data.Poly.Multi.Semiring

  other-modules:
    Data.Poly.Internal.Dense
    Data.Poly.Internal.Dense.Field
    Data.Poly.Internal.Dense.DFT
    Data.Poly.Internal.Dense.GcdDomain
    Data.Poly.Internal.Dense.Laurent

  if flag(sparse)
    other-modules:
      Data.Poly.Internal.Convert
      Data.Poly.Internal.Multi
      Data.Poly.Internal.Multi.Core
      Data.Poly.Internal.Multi.Field
      Data.Poly.Internal.Multi.GcdDomain
      Data.Poly.Internal.Multi.Laurent

  build-depends:
    base >= 4.12 && < 5,
    deepseq >= 1.1 && < 1.5,
    primitive >= 0.6,
    semirings >= 0.5.2,
    vector >= 0.12.0.2

  if flag(sparse)
    build-depends:
      finite-typelits >= 0.1,
      vector-algorithms >= 0.8.0.3,
      vector-sized >= 1.1

  default-language: Haskell2010
  other-extensions: QuantifiedConstraints
  ghc-options: -Wall -Wcompat -Wredundant-constraints

  if flag(sparse)
    cpp-options: -DSupportSparse

test-suite poly-tests
  type: exitcode-stdio-1.0
  main-is: Main.hs
  other-modules:
    Dense
    DenseLaurent
    DFT
    Orthogonal
    Quaternion
    TestUtils
  if flag(sparse)
    other-modules:
      Multi
      MultiLaurent
      Sparse
      SparseLaurent
  build-depends:
    base >=4.10 && <5,
    mod >=0.1.2,
    poly,
    QuickCheck >=2.12,
    quickcheck-classes-base,
    quickcheck-classes >=0.6.3,
    semirings >= 0.5.2,
    tasty >= 0.11,
    tasty-quickcheck >= 0.8,
    vector >= 0.12.0.2
  if flag(sparse)
    build-depends:
      finite-typelits,
      vector-sized >= 1.4.2
  default-language: Haskell2010
  hs-source-dirs: test
  ghc-options: -Wall -Wcompat -threaded -rtsopts
  if flag(sparse)
    cpp-options: -DSupportSparse

benchmark poly-bench
  build-depends:
    base >=4.10 && <5,
    deepseq >= 1.1 && < 1.5,
    mod >=0.1.2,
    poly,
    semirings >= 0.2,
    vector >= 0.12.0.2
  build-depends:
    tasty-bench
  mixins:
    tasty-bench (Test.Tasty.Bench as Gauge.Main)
  type: exitcode-stdio-1.0
  main-is: Bench.hs
  other-modules:
    DenseBench
  if flag(sparse)
    other-modules:
      SparseBench
  default-language: Haskell2010
  hs-source-dirs: bench
  ghc-options: -Wall -Wcompat -O2 -fspecialise-aggressively
  if flag(sparse)
    cpp-options: -DSupportSparse