Skip to content

Commit f67bf41

Browse files
committed
tests: add test for failed case
1 parent 82fc856 commit f67bf41

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

Cabal-tests/tests/ParserTests.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ errorTest fp = cabalGoldenTest fp correct $ do
164164

165165
regressionTests :: TestTree
166166
regressionTests = testGroup "regressions"
167-
[ regressionTest "encoding-0.8.cabal"
167+
[ regressionTest "supervisors-0.1.cabal"
168+
, regressionTest "encoding-0.8.cabal"
168169
, regressionTest "Octree-0.5.cabal"
169170
, regressionTest "nothing-unicode.cabal"
170171
, regressionTest "multiple-libs-2.cabal"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
cabal-version: 2.2
2+
name: supervisors
3+
version: 0.2.1.0
4+
stability: Experimental
5+
synopsis: Monitor groups of threads with non-hierarchical lifetimes.
6+
description:
7+
The @supervisors@ package provides a useful abstraction for managing the
8+
groups of Haskell threads, which may not have a strictly hierarchical
9+
structure to their lifetimes.
10+
.
11+
Concretely, the library provides a `Supervisor` construct, which can be
12+
used to safely spawn threads while guaranteeing that:
13+
.
14+
* When the supervisor is killed, all of the threads it supervises will be
15+
killed.
16+
* Child threads can terminate in any order, and memory usage will always
17+
be proportional to the number of *live* supervised threads.
18+
.
19+
One way to think of it is that @supervisors@ is to @async@ as
20+
@resourcet@ is to @bracket@.
21+
.
22+
Note that this package is EXPERIMENTAL; it needs more careful testing before
23+
I can earnestly recommend relying on it.
24+
.
25+
See the README and module documentation for more information.
26+
homepage: https://github.com/zenhack/haskell-supervisors
27+
bug-reports: https://github.com/zenhack/haskell-supervisors/issues
28+
license: MIT
29+
license-file: LICENSE
30+
author: Ian Denhardt
31+
maintainer: [email protected]
32+
copyright: 2018 Ian Denhardt
33+
category: Concurrency
34+
build-type: Simple
35+
extra-source-files:
36+
CHANGELOG.md
37+
, README.md
38+
, .gitignore
39+
40+
common shared-opts
41+
build-depends:
42+
base >=4.11 && <5
43+
44+
library
45+
import: shared-opts
46+
exposed-modules: Supervisors
47+
hs-source-dirs: src/
48+
build-depends:
49+
stm ^>=2.5
50+
, containers >=0.5.9 && <0.7
51+
, safe-exceptions ^>= 0.1.7
52+
, async ^>=2.2.1
53+
default-language: Haskell2010
54+
55+
test-suite tests
56+
import: shared-opts
57+
type: exitcode-stdio-1.0
58+
main-is: Main.hs
59+
hs-source-dirs: tests/
60+
build-depends:
61+
supervisors
62+
, hspec >=2.6.0 && <2.8
63+
default-language: Haskell2010
64+
65+
source-repository head
66+
type: git
67+
branch: master
68+
location: https://github.com/zenhack/haskell-supervisors.git

0 commit comments

Comments
 (0)