packages feed

hashable-1.3.1.0: hashable.cabal

Cabal-version:       1.12
Name:                hashable
Version:             1.3.1.0
Synopsis:            A class for types that can be converted to a hash value
Description:         This package defines a class, 'Hashable', for types that
                     can be converted to a hash value.  This class
                     exists for the benefit of hashing-based data
                     structures.  The package provides instances for
                     basic types and a way to combine hash values.
Homepage:            http://github.com/haskell-unordered-containers/hashable
-- SPDX-License-Identifier : BSD-3-Clause
License:             BSD3
License-file:        LICENSE
Author:              Milan Straka <fox@ucw.cz>
                     Johan Tibell <johan.tibell@gmail.com>
Maintainer:          Oleg Grenrus <oleg.grenrus@iki.fi>
bug-reports:         https://github.com/haskell-unordered-containers/hashable/issues
Stability:           Provisional
Category:            Data
Build-type:          Simple
tested-with:         GHC==8.10.3, GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2

Extra-source-files:
  CHANGES.md, README.md

Flag integer-gmp
  Description: Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later.
  Default: True

Library
  Exposed-modules:   Data.Hashable
                     Data.Hashable.Lifted
                     Data.Hashable.Generic
  Other-modules:     Data.Hashable.Class
                     Data.Hashable.Generic.Instances

  C-sources:         cbits/fnv.c
  hs-source-dirs:    src

  Build-depends:     base       >= 4.5      && < 4.16
                   , bytestring >= 0.9      && < 0.12
                   , deepseq    >= 1.3      && < 1.5
                   , text       >= 0.12     && < 1.3
                   , ghc-prim

  if impl(ghc >= 9)
    Build-depends:    ghc-bignum >= 1.0 && <1.1
  else
    if flag(integer-gmp)
      Build-depends:   integer-gmp >= 0.4 && < 1.1
    else
      -- this is needed for the automatic flag to be well-balanced
      Build-depends:   integer-simple

  Default-Language:  Haskell2010
  Other-Extensions:  BangPatterns
                     CPP
                     DeriveDataTypeable
                     FlexibleContexts
                     FlexibleInstances
                     GADTs
                     KindSignatures
                     MagicHash
                     MultiParamTypeClasses
                     ScopedTypeVariables
                     Trustworthy
                     TypeOperators
                     UnliftedFFITypes

  Ghc-options:       -Wall -fwarn-tabs

Test-suite hashable-tests
  Type:              exitcode-stdio-1.0
  Hs-source-dirs:    tests
  Main-is:           Main.hs
  Other-modules:     Properties Regress
  Build-depends:     base,
                     bytestring,
                     ghc-prim,
                     hashable,
                     test-framework >= 0.3.3,
                     test-framework-hunit,
                     test-framework-quickcheck2 >= 0.2.9,
                     HUnit,
                     QuickCheck >= 2.4.0.1,
                     random >= 1.0 && < 1.2,
                     text >= 0.11.0.5
  if !os(windows)
    Build-depends:   unix
    CPP-options:     -DHAVE_MMAP
    Other-modules:   Regress.Mmap
    Other-Extensions: CApiFFI

  Ghc-options:       -Wall -fno-warn-orphans
  Default-Language:  Haskell2010

test-suite hashable-examples
  type:              exitcode-stdio-1.0
  build-depends: base, hashable, ghc-prim
  hs-source-dirs: examples
  main-is: Main.hs
  Default-Language:  Haskell2010

source-repository head
  type:     git
  location: https://github.com/haskell-unordered-containers/hashable.git