Add conditional dep on `nats` to restore compat with GHC < 7.10
[packages/stm.git] / stm.cabal
1 cabal-version:  >=1.10
2 name:           stm
3 version:        2.5.0.0
4 -- don't forget to update changelog.md file!
5
6 license:        BSD3
7 license-file:   LICENSE
8 maintainer:     libraries@haskell.org
9 homepage:       https://wiki.haskell.org/Software_transactional_memory
10 bug-reports:    https://github.com/haskell/stm/issues
11 synopsis:       Software Transactional Memory
12 category:       Concurrency
13 build-type:     Simple
14 tested-with:    GHC==8.6.*, GHC==8.4.*, GHC==8.2.*, GHC==8.0.*, GHC==7.10.*, GHC==7.8.*, GHC==7.6.*, GHC==7.4.*, GHC==7.2.*, GHC==7.0.*
15 description:
16     Software Transactional Memory, or STM, is an abstraction for
17     concurrent communication. The main benefits of STM are
18     /composability/ and /modularity/. That is, using STM you can write
19     concurrent abstractions that can be easily composed with any other
20     abstraction built using STM, without exposing the details of how
21     your abstraction ensures safety. This is typically not the case
22     with other forms of concurrent communication, such as locks or
23     'MVar's.
24
25 extra-source-files:
26     changelog.md
27
28 source-repository head
29     type:     git
30     location: https://github.com/haskell/stm.git
31
32 library
33     default-language: Haskell2010
34     other-extensions:
35         CPP
36         DeriveDataTypeable
37         FlexibleInstances
38         MagicHash
39         MultiParamTypeClasses
40         UnboxedTuples
41     if impl(ghc >= 7.2)
42         other-extensions: Trustworthy
43     if impl(ghc >= 7.9)
44         other-extensions: Safe
45
46     if !impl(ghc >= 7.10)
47         build-depends: nats (>= 0.1.3 && < 0.3) || (>= 1 && < 1.2)
48
49     build-depends:
50         base  >= 4.3 && < 4.13,
51         array >= 0.3 && < 0.6
52
53     exposed-modules:
54         Control.Concurrent.STM
55         Control.Concurrent.STM.TArray
56         Control.Concurrent.STM.TVar
57         Control.Concurrent.STM.TChan
58         Control.Concurrent.STM.TMVar
59         Control.Concurrent.STM.TQueue
60         Control.Concurrent.STM.TBQueue
61         Control.Concurrent.STM.TSem
62         Control.Monad.STM
63     other-modules:
64         Control.Sequential.STM
65
66     ghc-options: -Wall