summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-29 09:03:25 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-29 09:03:25 +0000
commit5ddf3654b1edd756e7644b71701e2d792d12ee23 (patch)
tree7155811bcc497cb178fbe73121fc614c1ea34ab5
parente9bc9168d7f4b2963ee2425c9a39019c5184da8a (diff)
automatic import of ghc-asyncopeneuler23.09
-rw-r--r--.gitignore1
-rwxr-xr-xasync.cabal114
-rw-r--r--ghc-async.spec103
-rw-r--r--sources1
4 files changed, 219 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..3222120 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/async-2.2.4.tar.gz
diff --git a/async.cabal b/async.cabal
new file mode 100755
index 0000000..e7315e5
--- /dev/null
+++ b/async.cabal
@@ -0,0 +1,114 @@
+name: async
+version: 2.2.4
+-- don't forget to update ./changelog.md!
+x-revision: 3
+synopsis: Run IO operations asynchronously and wait for their results
+
+description:
+ This package provides 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').
+
+license: BSD3
+license-file: LICENSE
+author: Simon Marlow
+maintainer: Simon Marlow <marlowsd@gmail.com>
+copyright: (c) Simon Marlow 2012
+category: Concurrency
+build-type: Simple
+cabal-version: >=1.10
+homepage: https://github.com/simonmar/async
+bug-reports: https://github.com/simonmar/async/issues
+tested-with:
+ GHC == 9.6.1
+ GHC == 9.4.4
+ GHC == 9.2.7
+ GHC == 9.0.2
+ GHC == 8.10.7
+ GHC == 8.8.4
+ 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
+ GHC == 7.2.2
+ GHC == 7.0.4
+
+extra-source-files:
+ changelog.md
+ bench/race.hs
+
+source-repository head
+ type: git
+ location: https://github.com/simonmar/async.git
+
+library
+ default-language: Haskell2010
+ other-extensions: CPP, MagicHash, RankNTypes, UnboxedTuples
+ if impl(ghc>=7.1)
+ other-extensions: Trustworthy
+ exposed-modules: Control.Concurrent.Async
+ build-depends: base >= 4.3 && < 4.19,
+ hashable >= 1.1.2.0 && < 1.5,
+ stm >= 2.2 && < 2.6
+
+test-suite test-async
+ default-language: Haskell2010
+ type: exitcode-stdio-1.0
+ hs-source-dirs: test
+ main-is: test-async.hs
+ build-depends: base,
+ async,
+ stm,
+ test-framework,
+ test-framework-hunit,
+ HUnit
+
+flag bench
+ default: False
+
+executable concasync
+ if !flag(bench)
+ buildable: False
+ default-language: Haskell2010
+ hs-source-dirs: bench
+ main-is: concasync.hs
+ build-depends: base, async, stm
+ ghc-options: -O2
+
+executable conccancel
+ if !flag(bench)
+ buildable: False
+ default-language: Haskell2010
+ hs-source-dirs: bench
+ main-is: conccancel.hs
+ build-depends: base, async, stm
+ ghc-options: -O2 -threaded
+
+executable race
+ if !flag(bench)
+ buildable: False
+ default-language: Haskell2010
+ hs-source-dirs: bench
+ main-is: race.hs
+ build-depends: base, async, stm
+ ghc-options: -O2 -threaded
diff --git a/ghc-async.spec b/ghc-async.spec
new file mode 100644
index 0000000..ec5cb1a
--- /dev/null
+++ b/ghc-async.spec
@@ -0,0 +1,103 @@
+%global pkg_name async
+%global pkgver %{pkg_name}-%{version}
+%bcond_with tests
+
+Name: ghc-%{pkg_name}
+Version: 2.2.4
+Release: 1
+Summary: Run IO operations asynchronously and wait for their results
+License: BSD-3-Clause
+URL: https://hackage.haskell.org/package/%{pkg_name}
+Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal#/%{pkg_name}.cabal
+BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-base-devel
+BuildRequires: ghc-base-prof
+BuildRequires: ghc-hashable-devel
+BuildRequires: ghc-hashable-prof
+BuildRequires: ghc-rpm-macros
+BuildRequires: ghc-stm-devel
+BuildRequires: ghc-stm-prof
+ExcludeArch: %{ix86}
+%if %{with tests}
+BuildRequires: ghc-HUnit-devel
+BuildRequires: ghc-HUnit-prof
+BuildRequires: ghc-test-framework-devel
+BuildRequires: ghc-test-framework-hunit-devel
+BuildRequires: ghc-test-framework-hunit-prof
+BuildRequires: ghc-test-framework-prof
+%endif
+
+%description
+This package provides 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').
+
+%package devel
+Summary: Haskell %{pkg_name} library development files
+Requires: %{name} = %{version}-%{release}
+Requires: ghc-compiler = %{ghc_version}
+Requires(post): ghc-compiler = %{ghc_version}
+Requires(postun): ghc-compiler = %{ghc_version}
+
+%description devel
+This package provides the Haskell %{pkg_name} library development files.
+
+%package -n ghc-%{pkg_name}-help
+Summary: Haskell %{pkg_name} library documentation
+BuildArch: noarch
+
+%description -n ghc-%{pkg_name}-help
+This package provides the Haskell %{pkg_name} library documentation.
+
+%package -n ghc-%{pkg_name}-prof
+Summary: Haskell %{pkg_name} profiling library
+Requires: ghc-%{pkg_name}-devel = %{version}-%{release}
+Supplements: (ghc-%{pkg_name}-devel and ghc-prof)
+
+%description -n ghc-%{pkg_name}-prof
+This package provides the Haskell %{pkg_name} profiling library.
+
+%prep
+%autosetup -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
+
+%build
+%ghc_lib_build
+
+%install
+%ghc_lib_install
+
+%check
+%cabal_test
+
+%post devel
+%ghc_pkg_recache
+
+%postun devel
+%ghc_pkg_recache
+
+%files -f %{name}.files
+%license LICENSE
+
+%files devel -f %{name}-devel.files
+%doc changelog.md
+
+%files -n ghc-%{pkg_name}-help -f ghc-%{pkg_name}-help.files
+%license LICENSE
+
+%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+
+%changelog
+* Tue Aug 22 2023 Lin Runze <lrzlin@163.com> 2.2.4-1
+- Initial packaging (Version 2.2.4)
diff --git a/sources b/sources
new file mode 100644
index 0000000..c4d8b01
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+ab045e22a02b07d8806086053c9a7fe0 async-2.2.4.tar.gz