packages feed

structures-0.1: structures.cabal

name:          structures
category:      Data, Structures
version:       0.1
license:       BSD3
cabal-version: >= 1.8
license-file:  LICENSE
author:        Edward A. Kmett
maintainer:    Edward A. Kmett <ekmett@gmail.com>
stability:     experimental
homepage:      http://github.com/ekmett/structures
bug-reports:   http://github.com/ekmett/structures/issues
copyright:     Copyright (C) 2013 Edward A. Kmett
build-type:    Custom
synopsis:      "Advanced" Data Structures

extra-source-files:
  .ghci
  .travis.yml
  .gitignore
  .vim.custom
  CHANGELOG.markdown
  README.markdown

description:
  This package is a playground for working with several types of advanced data structures including
  wavelet trees and cache oblivious lookahead arrays.

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

-- You can disable the QuickCheck tests with -f-test-properties
flag test-properties
  default: True
  manual: True

-- You can disable the HUnit tests with -f-test-hunit
-- NB: We have no hunit tests, so this is disabled.
flag test-hunit
  default: False
  manual: True

-- You can disable the doctests test suite with -f-test-doctests
flag test-doctests
  default: True
  manual: True

-- You can disable the hlint test suite with -f-test-hlint
flag test-hlint
  default: True
  manual: True

flag threaded
  default: True
  manual: True

flag llvm
  default: False
  manual: True

flag optimized
  default: True
  manual: True

library
  build-depends:
    base              >= 4     && < 5,
    contravariant     >= 0.4.2 && < 1,
    deepseq           >= 1.1   && < 1.4,
    free              >= 4.3   && < 5,
    ghc,
    ghc-prim,
    hashable          >= 1.2.1 && < 1.3,
    hybrid-vectors    >= 0.1   && < 1,
    lens              >= 4     && < 5,
    monad-st          >= 0.2.2 && < 1,
    parallel          >= 3.2   && < 3.3,
    primitive         >= 0.5   && < 0.6,
    semigroups        >= 0.9   && < 1,
    transformers      >= 0.3   && < 0.4,
    vector            >= 0.10  && < 0.11,
    vector-algorithms >= 0.5   && < 0.6

  hs-source-dirs: src

  exposed-modules:
    Data.Vector.Array
    Data.Vector.Bit
    Data.Vector.Bloom
    Data.Vector.Bloom.Mutable
    Data.Vector.Bloom.Util
    Data.Vector.Heap
    Data.Vector.Map
    Data.Vector.Map.Fusion
    Data.Vector.Set
    Data.Vector.Set.Fusion
    Data.Vector.Slow

  ghc-options: -Wall

  if flag(optimized)
    ghc-options: -O2

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  if impl(ghc<6.13)
    Ghc-Options: -finline-if-enough-args -fno-method-sharing

test-suite properties
  type: exitcode-stdio-1.0
  main-is: properties.hs
  ghc-options: -w
  hs-source-dirs: tests

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  if !flag(test-properties)
    buildable: False
  else
    build-depends:
      base,
      structures,
      deepseq,
      QuickCheck       >= 2.4,
      tasty            >= 0.3,
      tasty-quickcheck >= 0.3,
      tasty-th         >= 0.1.1

test-suite hunit
  type: exitcode-stdio-1.0
  main-is: hunit.hs
  ghc-options: -w
  hs-source-dirs: tests

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  if !flag(test-hunit)
    buildable: False
  else
    build-depends:
      base,
      structures,
      QuickCheck       >= 2.4,
      tasty            >= 0.3,
      tasty-hunit      >= 0.2,
      tasty-th         >= 0.1.1

test-suite hlint
  type: exitcode-stdio-1.0
  main-is: hlint.hs
  ghc-options: -w
  hs-source-dirs: tests

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  if !flag(test-hlint)
    buildable: False
  else
    build-depends:
      base,
      hlint >= 1.7

-- Verify the results of the examples
test-suite doctests
  type:           exitcode-stdio-1.0
  main-is:        doctests.hs
  ghc-options:    -Wall
  hs-source-dirs: tests

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  if !flag(test-doctests)
    buildable: False
  else
    build-depends:
      base,
      bytestring,
      containers,
      directory      >= 1.0,
      deepseq,
      doctest        >= 0.9.1,
      filepath,
      semigroups     >= 0.9,
      unordered-containers

  if impl(ghc<7.6.1)
    ghc-options: -Werror

benchmark maps
  type:           exitcode-stdio-1.0
  main-is:        maps.hs
  ghc-options:    -Wall
  hs-source-dirs: benchmarks

  if flag(optimized)
    ghc-options: -O2

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  build-depends:
    array,
    base,
    containers,
    criterion,
    mwc-random,
    structures,
    unordered-containers,
    vector

benchmark lookups
  type:           exitcode-stdio-1.0
  main-is:        lookups.hs
  ghc-options:    -Wall
  hs-source-dirs: benchmarks

  if flag(optimized)
    ghc-options: -O2

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  build-depends:
    array,
    base,
    containers,
    criterion,
    deepseq,
    MonadRandom,
    structures,
    unordered-containers,
    vector

benchmark inserts
  type:           exitcode-stdio-1.0
  main-is:        inserts.hs
  ghc-options:    -Wall
  hs-source-dirs: benchmarks

  if flag(optimized)
    ghc-options: -O2

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  build-depends:
    array,
    base,
    containers,
    criterion,
    deepseq,
    MonadRandom,
    structures,
    unordered-containers,
    vector