Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Update bounds & stackify #11

Merged
merged 2 commits into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 30 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
language: haskell
language: c

ghc:
- 7.8
- 7.6
- 7.4
sudo: false

matrix:
include:
- env: ARGS="--resolver nightly" COVER="" GHCVER=latest
addons: {apt: {packages: [libgmp-dev]}}

cache:
directories:
- $HOME/.stack
- $HOME/.local

before_install:
- cabal sandbox init
- for i in `cat REPOS`; do git clone http://github.com/haskell-distributed/$i; done
- for i in `cat REPOS`; do cabal sandbox add-source $i; done
- sudo apt-get update -qq
- sudo apt-get install -qq binutils-dev
- export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$PATH
- mkdir -p ~/.local/bin
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- stack --version

install:
# Don't run tests for dependencies.
- cabal install --only-dependencies
- cabal install --only-dependencies distributed-process-tests
- stack ${ARGS} setup --no-terminal

script:
- cabal install
- cabal install --enable-tests -j1 distributed-process-tests
- case "$COVER" in
true)
stack ${ARGS} test --coverage --no-terminal;
./coverage.sh;
;;
*)
stack ${ARGS} test --test-arguments='--plain'
;;
esac

notifications:
slack:
secure: g0NP1tkOe3+kI6O0Q1mgT/jPaLjxQ31J26MWouicu2F1Y3p73qTvv/QsOkafRMZDn07HlzgviCP25r7Ytg32pUAFvOh4U4MT2MpO0jUVVGPi4ZiwB+W5AH+HlDtJSickeSZ0AjXZSaGv8nQNegWkeaLQgLBIzrTHU8s0Y9K+whQ=
18 changes: 9 additions & 9 deletions distributed-process-client-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ library
build-depends:
base >= 4.4 && < 5,
data-accessor >= 0.2.2.3,
distributed-process >= 0.5.2 && < 0.7,
distributed-process-extras >= 0.2.0 && < 0.3,
distributed-process-async >= 0.2.1 && < 0.3,
distributed-process >= 0.6.6 && < 0.7,
distributed-process-extras >= 0.3.0 && < 0.4,
distributed-process-async >= 0.2.3 && < 0.3,
binary >= 0.6.3.0 && < 0.9,
deepseq >= 1.3.0.1 && < 1.6,
mtl,
Expand Down Expand Up @@ -68,9 +68,9 @@ test-suite ManagedProcessTests
base >= 4.4 && < 5,
ansi-terminal >= 0.5 && < 0.7,
containers,
distributed-process >= 0.5.2 && < 0.7,
distributed-process-extras >= 0.2.0 && < 0.3,
distributed-process-async >= 0.2.1 && < 0.3,
distributed-process >= 0.6.6 && < 0.7,
distributed-process-extras >= 0.3.0 && < 0.4,
distributed-process-async >= 0.2.3 && < 0.3,
distributed-process-client-server,
distributed-process-tests >= 0.4.2 && < 0.5,
network-transport >= 0.4 && < 0.5,
Expand Down Expand Up @@ -101,9 +101,9 @@ test-suite PrioritisedProcessTests
base >= 4.4 && < 5,
ansi-terminal >= 0.5 && < 0.7,
containers,
distributed-process >= 0.5.2 && < 0.7,
distributed-process-extras >= 0.2.0 && < 0.3,
distributed-process-async >= 0.2.1 && < 0.3,
distributed-process >= 0.6.6 && < 0.7,
distributed-process-extras >= 0.3.0 && < 0.4,
distributed-process-async >= 0.2.3 && < 0.3,
distributed-process-client-server,
distributed-process-tests >= 0.4.2 && < 0.5,
network-transport >= 0.4 && < 0.5,
Expand Down
23 changes: 15 additions & 8 deletions src/Control/Distributed/Process/ManagedProcess/Internal/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import Control.Distributed.Process.Extras
, Resolvable(..)
, Routable(..)
, NFSerializable
, Shutdown
)
import Control.Distributed.Process.Extras.Internal.Types
( resolveOrDie
Expand Down Expand Up @@ -88,13 +89,6 @@ instance NFData (CallRef a) where rnf (CallRef x) = rnf x `seq` ()
makeRef :: Recipient -> CallId -> CallRef a
makeRef r c = CallRef (r, c)

instance Resolvable (CallRef a) where
resolve (CallRef (r, _)) = resolve r

instance Routable (CallRef a) where
sendTo (CallRef (client, tag)) msg = sendTo client (CallResponse msg tag)
unsafeSendTo (CallRef (c, tag)) msg = unsafeSendTo c (CallResponse msg tag)

data Message a b =
CastMessage a
| CallMessage a (CallRef b)
Expand All @@ -106,6 +100,7 @@ instance (NFSerializable a, NFSerializable b) => NFData (Message a b) where
rnf (CastMessage a) = rnf a `seq` ()
rnf (CallMessage a b) = rnf a `seq` rnf b `seq` ()
rnf (ChanMessage a b) = rnf a `seq` rnf b `seq` ()
instance (NFSerializable a, NFSerializable b) => NFSerializable (Message a b)
deriving instance (Eq a, Eq b) => Eq (Message a b)
deriving instance (Show a, Show b) => Show (Message a b)

Expand All @@ -115,9 +110,22 @@ data CallResponse a = CallResponse a CallId
instance Serializable a => Binary (CallResponse a)
instance NFSerializable a => NFData (CallResponse a) where
rnf (CallResponse a c) = rnf a `seq` rnf c `seq` ()
instance NFSerializable a => NFSerializable (CallResponse a)
deriving instance Eq a => Eq (CallResponse a)
deriving instance Show a => Show (CallResponse a)

instance Resolvable (CallRef a) where
resolve (CallRef (r, _)) = resolve r

instance Routable (CallRef a) where
sendTo (CallRef (client, tag)) msg = sendTo client (CallResponse msg tag)
unsafeSendTo (CallRef (c, tag)) msg = unsafeSendTo c (CallResponse msg tag)

-- yuk yuk, move these back into -extras before we release...

instance NFSerializable Shutdown
instance NFSerializable ()

-- | Return type for and 'InitHandler' expression.
data InitResult s =
InitOk s Delay {-
Expand Down Expand Up @@ -417,4 +425,3 @@ waitResponse mTimeout cRef =
case mTimeout of
(Just ti) -> finally (receiveTimeout (asTimeout ti) matchers) (unmonitor mRef)
Nothing -> finally (receiveWait matchers >>= return . Just) (unmonitor mRef)

11 changes: 11 additions & 0 deletions stack-ghc-7.10.3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resolver: nightly-2016-03-08

packages:
- '.'
- location:
git: https://github.com/haskell-distributed/distributed-process-systest.git
commit: 6b8749fd38141425e6b677d5a5137b3fe09cc127
extra-dep: true

extra-deps:
- distributed-process-0.6.6 # missing snapshot
12 changes: 12 additions & 0 deletions stack-ghc-8.0.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
resolver: lts-7.18

packages:
- '.'

extra-deps:
- network-transport-inmemory-0.5.1 # snapshot 0.5.2 in lts-7.18
- distributed-process-0.6.6 # missing snapshot
- distributed-process-extras-0.3.0 # missing snapshot
- distributed-process-async-0.2.4 # missing snapshot
- distributed-process-systest-0.1.0 # missing prior to Jan-2017
- rematch-0.2.0.0
15 changes: 15 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resolver: nightly-2017-02-03

packages:
- '.'
- location:
git: https://github.com/haskell-distributed/distributed-process-async.git
commit: 7c353e52b183519c6273ef62639e55eb859cc5c8
extra-dep: true

extra-deps:
- network-transport-inmemory-0.5.1 # snapshot 0.5.2 in lts-7.18
- distributed-process-0.6.6 # missing snapshot
- distributed-process-extras-0.3.0 # missing snapshot
- distributed-process-systest-0.1.1 # missing prior to Jan-2017
- rematch-0.2.0.0