packages feed

linear-1.23: linear.cabal

name:          linear
category:      Math, Algebra
version:       1.23
license:       BSD3
cabal-version: >= 1.10
license-file:  LICENSE
author:        Edward A. Kmett
maintainer:    Edward A. Kmett <ekmett@gmail.com>
stability:     provisional
homepage:      http://github.com/ekmett/linear/
bug-reports:   http://github.com/ekmett/linear/issues
copyright:     Copyright (C) 2012-2015 Edward A. Kmett
synopsis:      Linear Algebra
description:   Types and combinators for linear algebra on free vector spaces
build-type:    Simple
tested-with:   GHC == 8.0.2
             , GHC == 8.2.2
             , GHC == 8.4.4
             , GHC == 8.6.5
             , GHC == 8.8.4
             , GHC == 8.10.7
             , GHC == 9.0.2
             , GHC == 9.2.8
             , GHC == 9.4.5
             , GHC == 9.6.2
extra-source-files:
  .gitignore
  .hlint.yaml
  .vim.custom
  CHANGELOG.markdown
  README.markdown

flag template-haskell
  description:
    You can disable the use of the `template-haskell` package using `-f-template-haskell`.
    .
    Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
  default: True
  manual: True

flag herbie
  description: Enable `herbie`.
  default: False
  manual: True

source-repository head
  type: git
  location: https://github.com/ekmett/linear

library
  build-depends:
    adjunctions          >= 4     && < 5,
    base                 >= 4.9   && < 5,
    base-orphans         >= 0.8.3 && < 1,
    binary               >= 0.5   && < 0.9,
    bytes                >= 0.15  && < 1,
    cereal               >= 0.4.1.1 && < 0.6,
    containers           >= 0.4   && < 0.8,
    deepseq              >= 1.1   && < 1.6,
    distributive         >= 0.5.1 && < 1,
    ghc-prim,
    hashable             >= 1.2.7.0 && < 1.5,
    indexed-traversable  >= 0.1.1 && < 0.2,
    lens                 >= 4.15.2 && < 6,
    random               >= 1.0   && < 1.3,
    reflection           >= 2     && < 3,
    semigroupoids        >= 5.2.1 && < 7,
    tagged               >= 0.8.6 && < 1,
    transformers         >= 0.5   && < 0.7,
    transformers-compat  >= 0.5.0.4 && < 1,
    unordered-containers >= 0.2.3 && < 0.3,
    vector               >= 0.12.1.2 && < 0.14,
    void                 >= 0.6   && < 1

  if impl(ghc < 8.0)
    build-depends: semigroups >= 0.9 && < 1

  if flag(template-haskell) && impl(ghc)
    build-depends: template-haskell >= 2.11.1.0 && < 3.0

  if flag(herbie)
    build-depends: HerbiePlugin >= 0.1 && < 0.2
    ghc-options: -fplugin=Herbie
    cpp-options: -DHERBIE

  exposed-modules:
    Linear
    Linear.Affine
    Linear.Algebra
    Linear.Binary
    Linear.Conjugate
    Linear.Covector
    Linear.Epsilon
    Linear.Instances
    Linear.Matrix
    Linear.Metric
    Linear.Plucker
    Linear.Plucker.Coincides
    Linear.Projection
    Linear.Quaternion
    Linear.Trace
    Linear.V
    Linear.V0
    Linear.V1
    Linear.V2
    Linear.V3
    Linear.V4
    Linear.Vector

  ghc-options: -Wall -Wtabs -O2 -fdicts-cheap -funbox-strict-fields -Wno-trustworthy-safe
  hs-source-dirs: src

  default-language: Haskell2010

  x-docspec-extra-packages: simple-reflect

-- We need this dummy test-suite to add simple-reflect to the install plan
--
-- When cabal-install's extra-packages support becomes widely available
-- (i.e. after 3.4 release), we can remove this test-suite.
test-suite doctests
  type:              exitcode-stdio-1.0
  main-is:           doctests.hs
  hs-source-dirs:    tests
  default-language:  Haskell2010

  build-depends: base, simple-reflect >= 0.3.1

test-suite test
  type:           exitcode-stdio-1.0
  main-is:        Test.hs
  other-modules:  Prop.Quaternion
                  Prop.V3
                  Unit.Binary
                  Unit.Plucker
                  Unit.V
  ghc-options:    -Wall -threaded
  hs-source-dirs: tests
  build-depends:
    base,
    binary,
    bytestring,
    deepseq,
    test-framework >= 0.8,
    test-framework-hunit >= 0.3,
    test-framework-quickcheck2 >= 0.3,
    HUnit >= 1.2.5,
    linear,
    QuickCheck >= 2.5,
    reflection,
    vector
  default-language: Haskell2010