name:               enummapmap
version:            0.6.0
synopsis:           Map of maps using Enum types as keys
description:        This package provides 'maps of maps' using Enum types as
                    keys.  The code is based upon Data.IntMap in
                    containers 5.0.
license:            BSD3
license-file:       LICENSE
author:             Matthew West and authors of containers v5.0
maintainer:         Matthew West
category:           Data, Data Structures
build-type:         Simple

cabal-version:      >=1.10

source-repository head
   type:            git
   location:        http://github.com/bovinespirit/enummapmap.git

Library
   exposed-modules: Data.EnumMapMap.Lazy, Data.EnumMapMap.Strict,
                    Data.EnumMapSet
   other-modules:   Data.EnumMapMap.Base, Data.EnumMapSet.Base
   build-depends:   base >= 4.0 && < 5,
                    data-default,
                    deepseq >= 1.2 && < 1.4,
                    ghc-prim,
                    safecopy >= 0.8 && < 0.9,
                    semigroups >= 0.8
   ghc-options:     -Wall -O2
   default-language: Haskell2010

Test-Suite test-enummapmap-lazy
    type:             exitcode-stdio-1.0
    main-is:          UnitEnumMapMap.hs
    hs-source-dirs:   test
    ghc-options:      -Wall -O2
    default-language: Haskell2010
    build-depends:    base >= 4.0 && < 5,
                      HUnit,
                      QuickCheck >= 2,
                      hspec >= 1.3,
                      hspec-expectations,
                      cereal >= 0.4,
                      deepseq >= 1.2 && < 1.4,
                      safecopy >= 0.8 && < 0.9,
                      semigroups >= 0.8,
                      enummapmap
    cpp-options:      -DTESTING -DLAZY

Test-Suite test-enummapmap-intmap-lazy
    type:             exitcode-stdio-1.0
    main-is:          EnumMapMapVsIntMap.hs
    hs-source-dirs:   test
    ghc-options:      -Wall -O2
    default-language: Haskell2010
    build-depends:    base >= 4.0 && < 5,
                      HUnit,
                      QuickCheck >= 2,
                      hspec >= 1.3,
                      deepseq >= 1.2 && < 1.4,
                      semigroups >= 0.8,
                      containers >= 0.4.2,
                      enummapmap
    cpp-options:      -DTESTING -DLAZY

Test-Suite test-enummapmap-strict
    type:             exitcode-stdio-1.0
    main-is:          UnitEnumMapMap.hs
    hs-source-dirs:   test
    ghc-options:      -Wall -O2
    default-language: Haskell2010
    build-depends:    base >= 4.0 && < 5,
                      HUnit,
                      QuickCheck >= 2,
                      hspec >= 1.3,
                      hspec-expectations,
                      cereal >= 0.4,
                      deepseq >= 1.2 && < 1.4,
                      safecopy >= 0.8 && < 0.9,
                      semigroups >= 0.8,
                      enummapmap
    cpp-options:      -DTESTING -DSTRICT

Test-Suite test-enummapmap-intmap-strict
    type:             exitcode-stdio-1.0
    main-is:          EnumMapMapVsIntMap.hs
    hs-source-dirs:   test
    ghc-options:      -Wall -O2
    default-language: Haskell2010
    build-depends:    base >= 4.0 && < 5,
                      HUnit,
                      QuickCheck >= 2,
                      hspec >= 1.3,
                      deepseq >= 1.2 && < 1.4,
                      semigroups >= 0.8,
                      containers >= 0.4.2,
                      enummapmap
    cpp-options:      -DTESTING -DSTRICT

Test-Suite test-enummapset
    type:             exitcode-stdio-1.0
    main-is:          UnitEnumMapSet.hs
    hs-source-dirs:   test
    ghc-options:      -Wall -O2
    default-language: Haskell2010
    build-depends:    base >= 4.0 && < 5,
                      HUnit,
                      QuickCheck >= 2,
                      hspec >= 1.3,
                      hspec-expectations,
                      cereal >= 0.4,
                      deepseq >= 1.2 && < 1.4,
                      safecopy >= 0.8 && < 0.9,
                      containers >= 0.4.2,
                      enummapmap

Test-Suite test-enummapset-intset
    type:             exitcode-stdio-1.0
    main-is:          EnumMapSetVsIntSet.hs
    hs-source-dirs:   test
    ghc-options:      -Wall -O2
    default-language: Haskell2010
    build-depends:    base >= 4.0 && < 5,
                      HUnit,
                      QuickCheck >= 2,
                      hspec >= 0.9,
                      deepseq >= 1.2 && < 1.4,
                      containers >= 0.4.2,
                      enummapmap
    cpp-options:      -DTESTING

Test-Suite test-both-lazy
    type:             exitcode-stdio-1.0
    main-is:          UnitBoth.hs
    hs-source-dirs:   test
    ghc-options:      -Wall -O2
    default-language: Haskell2010
    build-depends:    base >= 4.0 && < 5,

                      HUnit,
                      hspec >= 0.9,
                      QuickCheck >= 2,

                      cereal >= 0.4,
                      deepseq >= 1.2 && < 1.4,
                      safecopy >= 0.8 && < 0.9,

                      enummapmap
    cpp-options:      -DTESTING -DLAZY

Test-Suite test-both-strict
    type:             exitcode-stdio-1.0
    main-is:          UnitBoth.hs
    hs-source-dirs:   test
    ghc-options:      -Wall -O2
    default-language: Haskell2010
    build-depends:    base >= 4.0 && < 5,

                      HUnit,
                      hspec >= 0.9,
                      QuickCheck >= 2,

                      cereal >= 0.4,
                      deepseq >= 1.2 && < 1.4,
                      safecopy >= 0.8 && < 0.9,

                      enummapmap
    cpp-options:      -DTESTING -DSTRICT

benchmark enummapmap-vs-intmap-bench
    type:             exitcode-stdio-1.0
    hs-source-dirs:   bench
    main-is:          IntMapVsEnumMapMap.hs
    build-depends:    base >= 4.0 && < 5,
                      criterion,
                      deepseq >= 1.2 && < 1.4,
                      containers >= 0.4.2,
                      mtl,
                      enummapmap
    default-language: Haskell2010
    ghc-options:      -O2