packages feed

concurrent-extra-0.4: concurrent-extra.cabal

name:          concurrent-extra
version:       0.4
cabal-version: >= 1.6
build-type:    Custom
stability:     experimental
author:        Bas van Dijk <v.dijk.bas@gmail.com>
               Roel van Dijk <vandijk.roel@gmail.com>
maintainer:    Bas van Dijk <v.dijk.bas@gmail.com>
               Roel van Dijk <vandijk.roel@gmail.com>
copyright:     (c) 2010 Bas van Dijk & Roel van Dijk
license:       BSD3
license-file:  LICENSE
category:      Concurrency
synopsis:      Extra concurrency primitives
description:
  The @concurrent-extra@ package offers among other things the
  following selection of synchronisation primitives:
  .
  * @Broadcast@: Wake multiple threads by broadcasting a value.
  .
  * @Event@: Wake multiple threads by signalling an event.
  .
  * @Lock@: Enforce exclusive access to a resource. Also known as a
    binary semaphore or mutex.
  .
  * @RLock@: A lock which can be acquired multiple times by the same
    thread. Also known as a reentrant mutex.
  .
  * @ReadWriteLock@: Multiple-reader, single-writer locks. Used to
    protect shared resources which may be concurrently read, but only
    sequentially written.
  .
  * @ReadWriteVar@: Concurrent read, sequential write variables.
  .
  Besides these synchronisation primitives the package also provides:
  .
  * @Thread@: Threads extended with the ability to wait for their
    termination.
  .
  * @Thread.Delay@: Arbitrarily long thread delays.
  .
  * @Timeout@: Wait arbitrarily long for an IO computation to finish.
  .
  Please consult the API documentation of the individual modules for
  more detailed information.
  .
  This package was inspired by the concurrency libraries of Java and
  Python.

source-repository head
  Type: darcs
  Location: http://code.haskell.org/concurrent-extra

-------------------------------------------------------------------------------

flag test
  description: Build the testing suite
  default:     False

flag hpc
  description: Enable program coverage on test executable
  default:     False

flag nolib
  description: Don't build the library
  default:     False

-------------------------------------------------------------------------------

library
  build-depends: base                 >= 3     && < 4.3
               , base-unicode-symbols >= 0.1.1 && < 0.2
  exposed-modules: Control.Concurrent.Lock
                 , Control.Concurrent.RLock
                 , Control.Concurrent.Event
                 , Control.Concurrent.Broadcast
                 , Control.Concurrent.ReadWriteLock
                 , Control.Concurrent.ReadWriteVar
                 , Control.Concurrent.Thread
                 , Control.Concurrent.Thread.Delay
                 , Control.Concurrent.Timeout
  other-modules: Utils
  ghc-options: -Wall

  if flag(nolib)
    buildable: False

-------------------------------------------------------------------------------

executable test-concurrent-extra
  main-is: test.hs
  other-modules: Control.Concurrent.Event.Test
               , Control.Concurrent.Lock.Test
               , Control.Concurrent.RLock.Test
               , Control.Concurrent.Broadcast.Test
               , Control.Concurrent.ReadWriteLock.Test
               , Control.Concurrent.ReadWriteVar.Test
               , Control.Concurrent.Thread.Test
               , Control.Concurrent.Timeout.Test
               , TestUtils

  ghc-options: -Wall

  if flag(test)
    build-depends: HUnit                      >= 1.2.2 && < 1.3
                 , QuickCheck                 >= 2.1.0 && < 2.2
                 , test-framework             >= 0.2.4 && < 0.3
                 , test-framework-hunit       >= 0.2.4 && < 0.3
                 , test-framework-quickcheck2 >= 0.2.4 && < 0.3
    buildable: True
  else
    buildable: False

  if flag(hpc)
    ghc-options: -fhpc