packages feed

strict-containers-0.1: strict-containers.cabal

Name:           strict-containers
Version:        0.1
Synopsis:       Strict containers.
Category:       Data, Data Structures
Description:
  This package provides strict versions of some standard Haskell containers -
  including 'HashMap', 'IntMap', 'Map', 'Sequence', and 'Vector'.
  .
  The reasoning is the same as that for our @strict@ package - though some
  containers already define strict /operations/ that force their inputs, the
  underlying data type is shared between the lazy and strict variants, i.e. by
  default lazy. In particular, instances are defined lazily on the common type,
  meaning that external utilities such as @lens@, @optics@, and deserialisation
  instances e.g. for @binary@ and @serialise@, all work lazily and there is not
  even the option to go strict.
  .
  This package defines separate data types, to avoid these problems. Instances
  can then be defined on these fully-strict data types.
  .
  To be clear, the "strict" vs "lazy" discussion refers to the values of a map
  or the elements of a sequence. The standard variants of these data structures
  that can be lazy-or-strict are already always-strict in their keys (for maps)
  and lengths (for sequences) respectively. This is also why we don't define
  strict variants of sets here, since the standard variants are already strict
  in their elements.
  .
  Note: generally, instances for strict containers violate their respective
  laws in the presence of bottom (undefined, error, infinite-loop). In the
  absence of bottom, laws are preserved.
  .
  This library mirrors the API of the standard lazy-or-strict variants in
  @containers@ and @unordered-containers@, including methods and fundamental
  instances. It also contains instances for @binary@ and @indexed-traversable@.
  More instances are defined in other packages, e.g. @strict-containers-lens@
  and @strict-containers-serialise@.
  .
  The current version of this library has been autogenerated from:
  .
-- generated list for versions
-- DO NOT EDIT below, AUTOGEN versions
  * containers v0.6.4.1
  * unordered-containers v0.2.13.0
  * vector v0.12.3.0
-- DO NOT EDIT above, AUTOGEN versions
License:        BSD3
License-File:   LICENSE
Maintainer:     Ximin Luo <infinity0@pwned.gg>
Copyright:      (c) 2021 by Ximin Luo
Homepage:       https://github.com/haskellari/strict-containers
Cabal-Version: >= 1.10
Build-type:     Simple
extra-source-files:
    CHANGELOG.md
    -- generated list for includes
    -- DO NOT EDIT below, AUTOGEN includes
    include/containers.h
    -- DO NOT EDIT above, AUTOGEN includes
tested-with:
  GHC ==8.2.2
   || ==8.4.4
   || ==8.6.5
   || ==8.8.3
   || ==8.10.4
   || ==9.0.1

library
  default-language: Haskell2010
  hs-source-dirs:   src
  ghc-options:      -Wall

  build-depends:
      base                  >= 4.5.0.0  && < 5
    , array                 >= 0.4.0.0
    , binary                >= 0.8.4.1  && < 0.9
    , containers            >= 0.5.9.2  && < 0.7
    , deepseq               >= 1.2      && < 1.5
    , indexed-traversable   >= 0.1.1    && < 0.2
    , hashable              >= 1.2.7.0  && < 1.4
    , primitive             >= 0.6.4.0  && < 0.8
    , unordered-containers  >= 0.2      && < 0.3
    , strict                >= 0.4      && < 0.5
    , vector                >= 0.12     && < 0.13
    , vector-binary-instances >= 0.2    && < 0.3

  exposed-modules:
    Data.Strict.HashMap
    Data.Strict.HashMap.Internal
    -- generated list for HashMap
    -- DO NOT EDIT below, AUTOGEN HashMap
    Data.Strict.HashMap.Autogen.Strict
    Data.Strict.HashMap.Autogen.Internal
    Data.Strict.HashMap.Autogen.Internal.Array
    Data.Strict.HashMap.Autogen.Internal.Strict
    Data.Strict.HashMap.Autogen.Internal.List
    Data.Strict.HashMap.Autogen.Internal.Unsafe
    -- DO NOT EDIT above, AUTOGEN HashMap
    Data.Strict.HashSet
    Data.Strict.IntMap
    Data.Strict.IntMap.Internal
    -- generated list for IntMap
    -- DO NOT EDIT below, AUTOGEN IntMap
    Data.Strict.IntMap.Autogen.Strict
    Data.Strict.IntMap.Autogen.Internal
    Data.Strict.IntMap.Autogen.Merge.Strict
    Data.Strict.IntMap.Autogen.Strict.Internal
    Data.Strict.IntMap.Autogen.Internal.Debug
    Data.Strict.IntMap.Autogen.Internal.DeprecatedDebug
    -- DO NOT EDIT above, AUTOGEN IntMap
    Data.Strict.IntSet
    Data.Strict.Map
    Data.Strict.Map.Internal
    -- generated list for Map
    -- DO NOT EDIT below, AUTOGEN Map
    Data.Strict.Map.Autogen.Strict
    Data.Strict.Map.Autogen.Internal
    Data.Strict.Map.Autogen.Merge.Strict
    Data.Strict.Map.Autogen.Strict.Internal
    Data.Strict.Map.Autogen.Internal.Debug
    Data.Strict.Map.Autogen.Internal.DeprecatedShowTree
    -- DO NOT EDIT above, AUTOGEN Map
    Data.Strict.Sequence
    Data.Strict.Sequence.Internal
    -- generated list for Sequence
    -- DO NOT EDIT below, AUTOGEN Sequence
    Data.Strict.Sequence.Autogen
    Data.Strict.Sequence.Autogen.Internal
    Data.Strict.Sequence.Autogen.Internal.Sorting
    -- DO NOT EDIT above, AUTOGEN Sequence
    Data.Strict.Set
    -- generated list for ContainersUtils
    -- DO NOT EDIT below, AUTOGEN ContainersUtils
    Data.Strict.ContainersUtils.Autogen.Coercions
    Data.Strict.ContainersUtils.Autogen.BitUtil
    Data.Strict.ContainersUtils.Autogen.StrictPair
    Data.Strict.ContainersUtils.Autogen.StrictMaybe
    Data.Strict.ContainersUtils.Autogen.PtrEquality
    Data.Strict.ContainersUtils.Autogen.State
    Data.Strict.ContainersUtils.Autogen.BitQueue
    Data.Strict.ContainersUtils.Autogen.TypeError
    -- DO NOT EDIT above, AUTOGEN ContainersUtils
    Data.Strict.Vector
    Data.Strict.Vector.Internal
    -- generated list for Vector
    -- DO NOT EDIT below, AUTOGEN Vector
    Data.Strict.Vector.Autogen
    Data.Strict.Vector.Autogen.Mutable
    -- DO NOT EDIT above, AUTOGEN Vector

  include-dirs: include

-- generated list for tests
-- DO NOT EDIT below, AUTOGEN tests
test-suite map-strict-properties
  default-language: Haskell2010
  hs-source-dirs:   tests
  main-is:          map-properties.hs
  type:             exitcode-stdio-1.0
  build-depends:    containers, strict-containers
  build-depends:
      array    >=0.4.0.0
    , base     >=4.6     && <5
    , deepseq  >=1.2     && <1.5

  cpp-options:      -DSTRICT
  ghc-options:      -O2
  other-extensions:
    BangPatterns
    CPP

  build-depends:
      HUnit
    , QuickCheck                  >=2.7.1
    , test-framework
    , test-framework-hunit
    , test-framework-quickcheck2
    , transformers

test-suite map-strictness-properties
  default-language: Haskell2010
  hs-source-dirs:   tests
  main-is:          map-strictness.hs
  type:             exitcode-stdio-1.0
  build-depends:    containers, strict-containers
  build-depends:
      array                       >=0.4.0.0
    , base                        >=4.6     && <5
    , ChasingBottoms
    , deepseq                     >=1.2     && <1.5
    , HUnit
    , QuickCheck                  >=2.7.1
    , test-framework              >=0.3.3
    , test-framework-quickcheck2  >=0.2.9
    , test-framework-hunit

  ghc-options:      -Wall
  other-extensions:
    BangPatterns
    CPP

  other-modules:
    Utils.IsUnit

test-suite intmap-strict-properties
  default-language: Haskell2010
  hs-source-dirs:   tests
  main-is:          intmap-properties.hs
  type:             exitcode-stdio-1.0
  cpp-options:      -DSTRICT
  other-modules:    IntMapValidity
  build-depends:    strict-containers
  build-depends:
      array    >=0.4.0.0
    , base     >=4.6     && <5
    , deepseq  >=1.2     && <1.5

  ghc-options:      -O2
  other-extensions:
    BangPatterns
    CPP

  build-depends:    containers, strict-containers
  build-depends:
      HUnit
    , QuickCheck                  >=2.7.1
    , test-framework
    , test-framework-hunit
    , test-framework-quickcheck2

test-suite intmap-strictness-properties
  default-language: Haskell2010
  hs-source-dirs:   tests
  main-is:          intmap-strictness.hs
  type:             exitcode-stdio-1.0
  other-extensions:
    BangPatterns
    CPP

  build-depends:    containers, strict-containers
  build-depends:
      array                       >=0.4.0.0
    , base                        >=4.6     && <5
    , ChasingBottoms
    , deepseq                     >=1.2     && <1.5
    , HUnit
    , QuickCheck                  >=2.7.1
    , test-framework              >=0.3.3
    , test-framework-quickcheck2  >=0.2.9
    , test-framework-hunit

  ghc-options:      -Wall

  other-modules:
    Utils.IsUnit

test-suite seq-properties
  default-language: Haskell2010
  hs-source-dirs:   tests
  main-is:          seq-properties.hs
  type:             exitcode-stdio-1.0
  build-depends:    strict-containers
  build-depends:
      array    >=0.4.0.0
    , base     >=4.6     && <5
    , deepseq  >=1.2     && <1.5

  ghc-options:      -O2
  other-extensions:
    BangPatterns
    CPP

  build-depends:
      QuickCheck                  >=2.7.1
    , test-framework
    , test-framework-quickcheck2
    , transformers

test-suite hashmap-strict-properties
  hs-source-dirs: tests
  main-is: HashMapProperties.hs
  type: exitcode-stdio-1.0

  build-depends:
    base,
    containers >= 0.5.8,
    hashable >= 1.0.1.1,
    QuickCheck >= 2.4.0.1,
    test-framework >= 0.3.3,
    test-framework-quickcheck2 >= 0.2.9,
    strict-containers,
    unordered-containers

  default-language: Haskell2010
  ghc-options: -Wall
  cpp-options: -DASSERTS -DSTRICT

test-suite vector-tests-O0
  Default-Language: Haskell2010
  type: exitcode-stdio-1.0
  Main-Is:  VectorMain.hs

  other-modules: Boilerplater
                 Tests.Bundle
                 Tests.Move
                 Tests.Vector
                 Tests.Vector.Property
                 Tests.Vector.Boxed
                 Tests.Vector.UnitTests
                 Utilities

  hs-source-dirs: tests
  Build-Depends: base >= 4.5 && < 5, template-haskell, base-orphans >= 0.6, vector, strict-containers,
                 primitive, random,
                 QuickCheck >= 2.9 && < 2.15, HUnit, tasty,
                 tasty-hunit, tasty-quickcheck,
                 transformers >= 0.2.0.0
  if !impl(ghc > 8.0)
    Build-Depends: semigroups

  default-extensions: CPP,
              ScopedTypeVariables,
              PatternGuards,
              MultiParamTypeClasses,
              FlexibleContexts,
              Rank2Types,
              TypeSynonymInstances,
              TypeFamilies,
              TemplateHaskell

  Ghc-Options: -O0 -threaded
  Ghc-Options: -Wall


-- DO NOT EDIT above, AUTOGEN tests