name:           enummapset
version:        0.7.1.0
synopsis:       IntMap and IntSet with Enum keys/elements.
description:    This package contains simple wrappers around 'Data.IntMap' and
                'Data.IntSet' with 'Enum' keys and elements respectively.
                Especially useful for 'Int's wrapped with `newtype`.
homepage:       https://github.com/Mikolaj/enummapset
bug-reports:    https://github.com/Mikolaj/enummapset/issues
license:        BSD3
license-file:   LICENSE
tested-with:
    GHC==8.4.4
  , GHC==8.6.5
  , GHC==8.8.4
  , GHC==8.10.7
  , GHC==9.0.2
  , GHC==9.2.2
author:         Michal Terepeta and others
maintainer:     Mikolaj Konarski <mikolaj.konarski@funktory.com>
category:       Data Structures
build-type:     Simple

cabal-version:  >=1.10

extra-source-files: README.md

source-repository head
  type:         git
  location:     https://github.com/Mikolaj/enummapset.git

flag debug
  description:  Debug build (more warnings, etc.)
  default:      False

Library
  exposed-modules:
    Data.EnumMap
    Data.EnumMap.Lazy
    Data.EnumMap.Strict
    Data.EnumSet

  other-modules:
    Data.EnumMap.Base

  build-depends:
    base >= 4.6 && < 5,
    aeson,
    containers >= 0.5.11 && < 0.7,
    deepseq >= 1.2 && < 1.5

  if impl(ghc < 8.0)
    build-depends: semigroups >=0.1 && <1.0

  if flag(debug)
    ghc-options: -Wall

  default-language: Haskell2010

  other-extensions: CPP, BangPatterns,
                    DataKinds, FlexibleContexts, FlexibleInstances,
                    KindSignatures, TypeFamilies, UndecidableInstances

Test-suite intset-properties
  hs-source-dirs: tests, .
  main-is: intset-properties.hs
  other-modules:
      Data.EnumSet
      Data.EnumMap.Lazy
      Data.EnumMap.Base
      Data.EnumMap
      IntSetValidity
      Json
  type: exitcode-stdio-1.0
  cpp-options: -DTESTING

  ghc-options: -O2
  default-language: Haskell2010
  other-extensions: CPP, BangPatterns,
                    DataKinds, FlexibleContexts, FlexibleInstances,
                    KindSignatures, TypeFamilies, UndecidableInstances

  build-depends:
    base,
    aeson,
    array >= 0.4.0.0,
    containers,
    deepseq,
    ghc-prim,

    HUnit,
    QuickCheck >= 2.7.1,
    test-framework,
    test-framework-hunit,
    test-framework-quickcheck2
  
  if impl(ghc < 8.0)
    build-depends: semigroups
