Skip to content

Commit

Permalink
Merge branch 'release/v0.2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitsutoshi Aoe committed Jul 26, 2014
2 parents d480803 + 64044b8 commit ad05496
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 29 deletions.
42 changes: 20 additions & 22 deletions .travis.yml
Expand Up @@ -7,19 +7,15 @@
# release of a major GHC version. Setting HPVER implictly sets
# GHCVER. Omit lines with versions you don't need/want testing for.
env:
- GHCVER=7.8.1
- GHCVER=7.6.3
- GHCVER=7.6.2
- GHCVER=7.6.1
- GHCVER=7.4.2
- GHCVER=7.4.1
- HPVER=2013.2.0.0
- HPVER=2012.4.0.0
- HPVER=2012.2.0.0
matrix:
- GHCVER=7.8.3
- GHCVER=7.6.3
- GHCVER=7.4.2
- HPVER=2013.2.0.0
- HPVER=2012.4.0.0

matrix:
allow_failures:
- env: HPVER=2012.2.0.0

# Note: the distinction between `before_install` and `install` is not
# important.
Expand Down Expand Up @@ -52,37 +48,39 @@ before_install:

- sudo add-apt-repository -y ppa:hvr/ghc
- sudo apt-get update
- sudo apt-get install cabal-install-1.18 ghc-$GHCVER
- sudo apt-get install cabal-install-1.20 ghc-$GHCVER
- export PATH=/opt/ghc/$GHCVER/bin:~/.cabal/bin:$PATH
- cabal-1.20 update
# install hpc-coveralls
- cabal-1.20 sandbox init
- cabal-1.20 install hpc-coveralls -j --bindir=$HOME/.cabal/bin/ --constraint='aeson >= 0.7'
- cabal-1.20 sandbox delete

install:
- cabal-1.18 update
- cabal-1.18 install --only-dependencies --enable-tests -j
- cabal-1.18 install hpc-coveralls -j --avoid-reinstalls
- cabal-1.20 install -j --only-dependencies --enable-tests --enable-benchmarks

# Here starts the actual work to be performed for the package under
# test; any command which exits with a non-zero exit code causes the
# build to fail.
script:
# -v2 provides useful information for debugging
- cabal-1.18 configure --enable-tests --enable-library-coverage
- cabal-1.20 configure --enable-tests --enable-benchmarks --enable-library-coverage --ghc-options="-Wall -Werror"

# this builds all libraries and executables
# (including tests/benchmarks)
- cabal-1.18 build -j
- cabal-1.20 build -j

- ln -s /usr/bin/cabal-1.18 ~/.cabal/bin/cabal
- run-cabal-test --show-details=always
- cabal-1.18 check
- run-cabal-test --cabal-name=cabal-1.20 --show-details=always
- cabal-1.20 check

# tests that a source-distribution can be generated
- cabal-1.18 sdist
- cabal-1.20 sdist

# check that the generated source-distribution can be built & installed
- export SRC_TGZ=$(cabal-1.18 info . | awk '{print $2 ".tar.gz";exit}') ;
- export SRC_TGZ=$(cabal-1.20 info . | awk '{print $2 ".tar.gz";exit}') ;
(cd dist/;
if [ -f "$SRC_TGZ" ]; then
cabal-1.18 install "$SRC_TGZ";
cabal-1.20 install "$SRC_TGZ";
else
echo "expected '$SRC_TGZ' not found";
exit 1;
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
## v0.2.0.1 - 2014-07-26

* Fix a typo in a haddock comment (#5 by @supki)
* Fix Travis CI failure

## v0.2.0 - 2014-05-01

* Generalize `Concurrently` (#4)
4 changes: 2 additions & 2 deletions lifted-async.cabal
@@ -1,5 +1,5 @@
name: lifted-async
version: 0.2.0
version: 0.2.0.1
synopsis: Run lifted IO operations asynchronously and wait for their results
homepage: https://github.com/maoe/lifted-async
bug-reports: https://github.com/maoe/lifted-async/issues
Expand Down Expand Up @@ -95,5 +95,5 @@ source-repository head

source-repository this
type: git
tag: v0.2.0
tag: v0.2.0.1
location: https://github.com/maoe/lifted-async.git
2 changes: 1 addition & 1 deletion src/Control/Concurrent/Async/Lifted.hs
Expand Up @@ -179,7 +179,7 @@ waitCatch
-> m (Either SomeException a)
waitCatch a = liftBase (A.waitCatch a) >>= sequenceEither

-- | Generalized version of 'A.catch'.
-- | Generalized version of 'A.cancel'.
cancel :: MonadBase IO m => Async (StM m a) -> m ()
cancel = liftBase . A.cancel

Expand Down
4 changes: 2 additions & 2 deletions tests/Test/Async/IO.hs
Expand Up @@ -2,7 +2,7 @@
module Test.Async.IO
( ioTestGroup
) where
import Control.Monad (when)
import Control.Monad (when, void)
import Data.Maybe (isJust, isNothing)

import Control.Concurrent.Lifted
Expand Down Expand Up @@ -78,7 +78,7 @@ case_async_poll = do
case_async_poll2 :: Assertion
case_async_poll2 = do
a <- async (return value)
wait a
void $ wait a
r <- poll a
when (isNothing r) $ assertFailure ""
r' <- poll a -- poll twice, just to check we don't deadlock
Expand Down
4 changes: 2 additions & 2 deletions tests/Test/Async/State.hs
Expand Up @@ -107,7 +107,7 @@ case_async_poll2 :: Assertion
case_async_poll2 =
void $ flip runStateT value $ do
a <- async (return value)
wait a
void $ wait a
r <- poll a
when (isNothing r) $
liftIO $ assertFailure "The result must not be Nothing."
Expand Down Expand Up @@ -148,4 +148,4 @@ case_link = do
case r of
Left e -> do
fromException e @?= Just TestException
Right _ -> assertFailure "An exception must be raised."
Right _ -> assertFailure "An exception must be raised."

0 comments on commit ad05496

Please sign in to comment.