packages feed

impure-containers-0.4.2: impure-containers.cabal

name:                impure-containers
version:             0.4.2
synopsis:            Mutable containers in haskell
description:         Please see README.md
homepage:            https://github.com/andrewthad/impure-containers#readme
license:             BSD3
license-file:        LICENSE
author:              Andrew Martin
maintainer:          andrew.thaddeus@gmail.com
copyright:           2016 Andrew Martin
category:            web
build-type:          Simple
cabal-version:       >=1.10
extra-source-files:
    cbits/Makefile
  , cbits/check.c
  , cbits/defs.h
  , cbits/sse-42-check.c

library
  hs-source-dirs:      src
  exposed-modules:
    Data.HashMap.Mutable.Basic
    -- Data.Heap.Mutable.ModelA
    -- Data.Heap.Mutable.ModelB
    Data.Heap.Mutable.ModelC
    Data.Heap.Mutable.ModelD
    Data.Graph.Immutable
    Data.Graph.Mutable
    Data.Trie.Mutable.Bits
    Data.Trie.Immutable.Bits
    Data.ArrayList.Generic
    Data.Graph.Types
    Data.Graph.Types.Internal
    Data.Primitive.PrimArray
    Data.Primitive.Array.Maybe
    Data.Primitive.MutVar.Maybe
    Data.Primitive.Bool
    Data.Maybe.Unsafe
    -- Data.Containers.Impure.Internal
  other-modules:
    Data.HashMap.Mutable.Internal.Array
    Data.HashMap.Mutable.Internal.CacheLine
    Data.HashMap.Mutable.Internal.CheapPseudoRandomBitStream
    Data.HashMap.Mutable.Internal.IntArray
    Data.HashMap.Mutable.Internal.Linear.Bucket
    Data.HashMap.Mutable.Internal.UnsafeTricks
    Data.HashMap.Mutable.Internal.Utils
  build-depends:
      base >= 4.8 && < 5
    , hashable >= 1.2 && < 1.3
    , primitive >= 0.6 && < 0.7
    , vector >= 0.11 && < 0.13
    , containers > 0.5 && < 0.6
    , ghc-prim
  default-language:    Haskell2010

  if flag(sse42) && !flag(portable)
    cc-options:  -DUSE_SSE_4_2 -msse4.2
    cpp-options: -DUSE_SSE_4_2
    C-sources:   cbits/sse-42.c

  if !flag(portable) && !flag(sse42)
    C-sources:       cbits/default.c

  if !flag(portable)
    C-sources:       cbits/common.c

  if flag(portable)
    cpp-options: -DNO_C_SEARCH -DPORTABLE

  if !flag(portable) && flag(unsafe-tricks) && impl(ghc)
    build-depends: ghc-prim
    cpp-options: -DUNSAFETRICKS

  if flag(debug)
    cpp-options: -DDEBUG

  if flag(bounds-checking)
    cpp-options: -DBOUNDS_CHECKING

  -- ghc-prof-options: -prof -auto-all

  ghc-options:
    -Wall -fwarn-tabs -funbox-strict-fields
    -fno-warn-unused-do-bind
    -- Turn this one back on later
    -- -O2

Flag unsafe-tricks
  Description: turn on unsafe GHC tricks
  Default:   True

Flag bounds-checking
  Description: if on, use bounds-checking array accesses
  Default: False

Flag debug
  Description: if on, spew debugging output to stdout
  Default: False

Flag sse42
  Description: if on, use SSE 4.2 extensions to search cache lines very
               efficiently. The portable flag forces this off.
  Default: False

Flag portable
  Description: if on, use only pure Haskell code and no GHC extensions.
  Default: False

test-suite impure-containers-test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  build-depends:
      base
    , impure-containers
    , containers
    , test-framework
    , test-framework-quickcheck2
    , QuickCheck
    , HUnit
    , test-framework-hunit
    , vector
    , transformers
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
  default-language:    Haskell2010

benchmark impure-containers-bench
  type:                exitcode-stdio-1.0
  hs-source-dirs:      bench
  main-is:             Main.hs
  build-depends:
      base
    , impure-containers
    , criterion
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N -O2
  default-language:    Haskell2010

source-repository head
  type:     git
  location: https://github.com/andrewthad/impure-containers