Skip to content

Commit 7ef0877

Browse files
committed
Fix some compilation issues
1 parent a84f695 commit 7ef0877

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ matrix:
6969
compiler: ": #stack default"
7070
addons: {apt: {packages: [libgmp-dev]}}
7171

72-
- env: BUILD=stack ARGS="--resolver lts-2"
72+
- env: BUILD=stack ARGS="--resolver lts-2" EXTRA_ARGS="http-conduit-2.1.10 http-client-0.4.31.1 http-client-tls-0.2.4 conduit-1.2.8 ."
7373
compiler: ": #stack 7.8.4"
7474
addons: {apt: {packages: [libgmp-dev]}}
7575

76-
- env: BUILD=stack ARGS="--resolver lts-3"
76+
- env: BUILD=stack ARGS="--resolver lts-3" EXTRA_ARGS="http-conduit-2.1.10 http-client-0.4.31.1 http-client-tls-0.2.4 conduit-1.2.8 ."
7777
compiler: ": #stack 7.10.2"
7878
addons: {apt: {packages: [libgmp-dev]}}
7979

@@ -100,7 +100,7 @@ matrix:
100100
# compiler: ": #stack 7.8.4 osx"
101101
# os: osx
102102

103-
- env: BUILD=stack ARGS="--resolver lts-3"
103+
- env: BUILD=stack ARGS="--resolver lts-3" EXTRA_ARGS="http-conduit-2.1.10 http-client-0.4.31.1 http-client-tls-0.2.4 conduit-1.2.8 ."
104104
compiler: ": #stack 7.10.2 osx"
105105
os: osx
106106

@@ -156,7 +156,7 @@ install:
156156
set -ex
157157
case "$BUILD" in
158158
stack)
159-
stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
159+
stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies $EXTRA_ARGS
160160
;;
161161
cabal)
162162
cabal --version
@@ -175,7 +175,7 @@ script:
175175
set -ex
176176
case "$BUILD" in
177177
stack)
178-
stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
178+
stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps $EXTRA_ARGS
179179
;;
180180
cabal)
181181
cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES

src/System/Process/Typed.hs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module System.Process.Typed
7878

7979
import qualified Data.ByteString as S
8080
import Data.ByteString.Lazy.Internal (defaultChunkSize)
81-
import Control.Exception (throw, throwIO)
81+
import Control.Exception (throwIO)
8282
import Control.Monad (void)
8383
import Control.Monad.IO.Class
8484
import qualified System.Process as P
@@ -98,6 +98,14 @@ import qualified Data.Conduit.Binary as CB
9898
import System.Posix.Types (GroupID, UserID)
9999
#endif
100100

101+
#if !MIN_VERSION_base(4, 8, 0)
102+
import Control.Applicative (Applicative (..), (<$>), (<$))
103+
#endif
104+
105+
#if !MIN_VERSION_process(1, 3, 0)
106+
import qualified System.Process.Internals as P (createProcess_)
107+
#endif
108+
101109
-- | An abstract configuration for a process, which can then be
102110
-- launched into an actual running 'Process'. Takes three type
103111
-- parameters, providing the types of standard input, standard output,
@@ -664,7 +672,7 @@ runProcess pc = liftIO $ withProcess pc waitExitCode
664672
runProcess_ :: MonadIO m
665673
=> ProcessConfig stdin stdout stderr
666674
-> m ()
667-
runProcess_ = void . runProcess
675+
runProcess_ = liftIO . void . runProcess
668676

669677
-- | Wait for the process to exit and then return its 'ExitCode'.
670678
--

test/System/Process/TypedSpec.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE OverloadedStrings #-}
23
module System.Process.TypedSpec (spec) where
34

@@ -16,6 +17,10 @@ import Data.Monoid ((<>))
1617
import qualified Data.Conduit.List as CL
1718
import qualified Data.ByteString.Base64 as B64
1819

20+
#if !MIN_VERSION_base(4, 8, 0)
21+
import Control.Applicative ((*>))
22+
#endif
23+
1924
spec :: Spec
2025
spec = do
2126
it "bytestring stdin" $ do

typed-process.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test-suite typed-process-test
4040
, conduit
4141
, conduit-extra
4242
, hspec
43-
, http-conduit
43+
, http-conduit >= 2.1.10
4444
, temporary
4545
, typed-process
4646
ghc-options: -threaded -rtsopts -with-rtsopts=-N

0 commit comments

Comments
 (0)