From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:47433) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmyxh-00075k-GA for guix-patches@gnu.org; Mon, 15 Jul 2019 07:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmyxf-0002v2-JU for guix-patches@gnu.org; Mon, 15 Jul 2019 07:16:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37856) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmyxd-0002uI-Qm for guix-patches@gnu.org; Mon, 15 Jul 2019 07:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmyxd-0004F5-Ld for guix-patches@gnu.org; Mon, 15 Jul 2019 07:16:01 -0400 Subject: [bug#36663] [PATCH 14/14] gnu: Add ghc-concurrent-extra Resent-Message-ID: From: Robert Vollmert Date: Mon, 15 Jul 2019 13:14:12 +0200 Message-Id: <20190715111412.74324-14-rob@vllmrt.net> In-Reply-To: <20190715111412.74324-1-rob@vllmrt.net> References: <20190715111412.74324-1-rob@vllmrt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36663@debbugs.gnu.org Cc: Robert Vollmert * gnu/packages/haskell-xyz.scm (ghc-concurrent-extra): New field. --- gnu/packages/haskell-xyz.scm | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index f8a063a7dd..37ff8c179e 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -259,3 +259,49 @@ The advantages of this package are: * Correct handling of asynchronous exceptions. * GHC specific functionality like forkOn and forkIOWithUnmask.") (license license:bsd-3))) + +(define-public ghc-concurrent-extra + (package + (name "ghc-concurrent-extra") + (version "0.7.0.12") + (source + (origin + (method url-fetch) + (uri (string-append + "https://hackage.haskell.org/package/concurrent-extra/concurrent-extra-" + version + ".tar.gz")) + (sha256 + (base32 + "1y8xk460fvnw0idzdiylmm874sjny4q9jxb1js9fjz8lw2wns3h4")))) + (build-system haskell-build-system) + (inputs + `(("ghc-unbounded-delays" ,ghc-unbounded-delays))) + (native-inputs + `(("ghc-hunit" ,ghc-hunit) + ("ghc-random" ,ghc-random) + ("ghc-test-framework" ,ghc-test-framework) + ("ghc-test-framework-hunit" + ,ghc-test-framework-hunit) + ("ghc-async" ,ghc-async))) + (home-page + "https://github.com/basvandijk/concurrent-extra") + (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. The package additionally provides an alternative that +works in the STM monad. +* 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. +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.") + (license license:bsd-3))) -- 2.20.1 (Apple Git-117)