From 9905b2ecb899948e8cada42213f242bf1ce9ba03 Mon Sep 17 00:00:00 2001 From: kili Date: Sun, 2 Dec 2012 20:10:22 +0000 Subject: [PATCH] A higher-level interface over threads, in which an "Async a" is a concurrent thread that will eventually deliver a value of type "a". The package provides ways to create "Async" computations, wait for their results, and cancel them. ok sthen@ --- devel/hs-async/Makefile | 27 +++++++++++++++++++++++++++ devel/hs-async/distinfo | 2 ++ devel/hs-async/pkg/DESCR | 14 ++++++++++++++ devel/hs-async/pkg/PLIST | 27 +++++++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 devel/hs-async/Makefile create mode 100644 devel/hs-async/distinfo create mode 100644 devel/hs-async/pkg/DESCR create mode 100644 devel/hs-async/pkg/PLIST diff --git a/devel/hs-async/Makefile b/devel/hs-async/Makefile new file mode 100644 index 00000000000..cbafd6060e6 --- /dev/null +++ b/devel/hs-async/Makefile @@ -0,0 +1,27 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2012/12/02 20:10:22 kili Exp $ + +COMMENT = asynchronous IO operations + +DISTNAME = async-2.0.1.3 +CATEGORIES = devel + +MAINTAINER = Matthias Kilian + +# BSD3 +PERMIT_PACKAGE_CDROM = Yes +PERMIT_PACKAGE_FTP = Yes +PERMIT_DISTFILES_CDROM =Yes +PERMIT_DISTFILES_FTP = Yes + +MODULES = lang/ghc + +MODGHC_BUILD = cabal hackage haddock register + +BUILD_DEPENDS = ${RUN_DEPENDS} +RUN_DEPENDS = devel/hs-stm>=2.2,<2.5 + +# Needs --enable-test, which will probably set by ghc.port.mk soon +# (when I have some numbers about build times). +NO_REGRESS = Yes + +.include diff --git a/devel/hs-async/distinfo b/devel/hs-async/distinfo new file mode 100644 index 00000000000..450afce141c --- /dev/null +++ b/devel/hs-async/distinfo @@ -0,0 +1,2 @@ +SHA256 (ghc/async-2.0.1.3.tar.gz) = cNaBCErKgmyE1yIyD8XWesYpSAKvuxP4tejqwrvJcuU= +SIZE (ghc/async-2.0.1.3.tar.gz) = 8345 diff --git a/devel/hs-async/pkg/DESCR b/devel/hs-async/pkg/DESCR new file mode 100644 index 00000000000..84b71a4b33e --- /dev/null +++ b/devel/hs-async/pkg/DESCR @@ -0,0 +1,14 @@ +A higher-level interface over threads, in which an "Async a" is a +concurrent thread that will eventually deliver a value of type "a". +The package provides ways to create "Async" computations, wait for +their results, and cancel them. + +Using Async is safer than using threads in two ways: + +* When waiting for a thread to return a result, if the thread dies + with an exception then the caller must either re-throw the exception + ('wait') or handle it ('waitCatch'); the exception cannot be + ignored. + +* The API makes it possible to build a tree of threads that are + automatically killed when their parent dies (see 'withAsync'). diff --git a/devel/hs-async/pkg/PLIST b/devel/hs-async/pkg/PLIST new file mode 100644 index 00000000000..f17c6d9b062 --- /dev/null +++ b/devel/hs-async/pkg/PLIST @@ -0,0 +1,27 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2012/12/02 20:10:22 kili Exp $ +lib/ghc/${DISTNAME}/ +lib/ghc/${DISTNAME}/Control/ +lib/ghc/${DISTNAME}/Control/Concurrent/ +lib/ghc/${DISTNAME}/Control/Concurrent/Async.hi +lib/ghc/${DISTNAME}/HS${DISTNAME}.o +lib/ghc/${DISTNAME}/libHS${DISTNAME}.a +lib/ghc/${DISTNAME}/register.sh +share/doc/hs-${DISTNAME}/ +share/doc/hs-${DISTNAME}/LICENSE +share/doc/hs-${DISTNAME}/html/ +share/doc/hs-${DISTNAME}/html/Control-Concurrent-Async.html +share/doc/hs-${DISTNAME}/html/async.haddock +share/doc/hs-${DISTNAME}/html/doc-index.html +share/doc/hs-${DISTNAME}/html/frames.html +share/doc/hs-${DISTNAME}/html/haddock-util.js +share/doc/hs-${DISTNAME}/html/hslogo-16.png +share/doc/hs-${DISTNAME}/html/index-frames.html +share/doc/hs-${DISTNAME}/html/index.html +share/doc/hs-${DISTNAME}/html/mini_Control-Concurrent-Async.html +share/doc/hs-${DISTNAME}/html/minus.gif +share/doc/hs-${DISTNAME}/html/ocean.css +share/doc/hs-${DISTNAME}/html/plus.gif +share/doc/hs-${DISTNAME}/html/synopsis.png +@exec /usr/bin/env HOME=/nonexistent %D/lib/ghc/${DISTNAME}/register.sh -v0 +@unexec /usr/bin/env HOME=/nonexistent %D/lib/ghc/${DISTNAME}/unregister.sh -v0 --force +lib/ghc/${DISTNAME}/unregister.sh