Skip to content

Commit 6dc3f39

Browse files
committed
Updated to GHC 7.10.1
1 parent 6393656 commit 6dc3f39

File tree

7 files changed

+31
-12
lines changed

7 files changed

+31
-12
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525
# - CABALVER=1.18 GHCVER=7.8.1
2626
# - CABALVER=1.18 GHCVER=7.8.2
2727
# - CABALVER=1.18 GHCVER=7.8.3
28-
# - CABALVER=1.22 GHCVER=7.10.1
28+
- CABALVER=1.22 GHCVER=7.10.1
2929
# - CABALVER=head GHCVER=head
3030
- CABALVER=1.18 HPVER=2014.2.0.0
3131
# - HPVER=2013.2.0.0

json-rpc-server.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- documentation, see http://haskell.org/cabal/users-guide/
33

44
name: json-rpc-server
5-
version: 0.1.4.0
5+
version: 0.1.5.0
66
license: MIT
77
license-file: LICENSE
88
category: Network, JSON
@@ -30,7 +30,7 @@ flag demo
3030
library
3131
exposed-modules: Network.JsonRpc.Server
3232
other-modules: Network.JsonRpc.Types
33-
build-depends: base >=4.3 && <4.8,
33+
build-depends: base >=4.3 && <4.9,
3434
aeson >=0.6 && <0.9,
3535
bytestring >=0.9 && <0.11,
3636
mtl >=1.1.1 && <2.3,
@@ -44,7 +44,7 @@ executable demo
4444
main-is: Demo.hs
4545
hs-source-dirs: demo
4646
if flag (demo)
47-
build-depends: base >=4.3 && <4.8,
47+
build-depends: base >=4.3 && <4.9,
4848
json-rpc-server,
4949
bytestring >=0.9 && <0.11,
5050
mtl >=1.1.1 && <2.3
@@ -56,7 +56,7 @@ test-suite tests
5656
main-is: TestSuite.hs
5757
other-modules: TestParallelism, Internal
5858
type: exitcode-stdio-1.0
59-
build-depends: base >=4.3 && <4.8,
59+
build-depends: base >=4.3 && <4.9,
6060
json-rpc-server,
6161
HUnit >=1.2 && <1.3,
6262
test-framework >=0.7 && <0.9,

src/Network/JsonRpc/Server.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,14 @@ import qualified Data.ByteString.Lazy as B
4343
import qualified Data.Aeson as A
4444
import qualified Data.Vector as V
4545
import qualified Data.HashMap.Strict as H
46-
import Control.Applicative ((<$>))
4746
import Control.Monad (liftM)
4847
import Control.Monad.Identity (runIdentity)
4948
import Control.Monad.Error (runErrorT, throwError)
5049

50+
#if !MIN_VERSION_base(4,8,0)
51+
import Control.Applicative ((<$>))
52+
#endif
53+
5154
-- $instructions
5255
-- * Create methods by calling 'toMethod' and providing the method
5356
-- names, lists of parameters, and functions to be called.

src/Network/JsonRpc/Types.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ import Data.Aeson ((.=), (.:), (.:?), (.!=))
3232
import Data.Aeson.Types (emptyObject)
3333
import qualified Data.Vector as V
3434
import qualified Data.HashMap.Strict as H
35-
import Control.Applicative ((<$>), (<*>), (<|>), (*>), empty)
3635
import Control.Monad (mplus, when)
3736
import Control.Monad.Error (Error, ErrorT, throwError, strMsg, noMsg)
3837
import Prelude hiding (length)
38+
import Control.Applicative ((<|>), empty)
39+
40+
#if !MIN_VERSION_base(4,8,0)
41+
import Control.Applicative ((<$>), (<*>), (*>))
42+
#endif
3943

4044
-- | Return type of a method. A method call can either fail with an 'RpcError'
4145
-- or succeed with a result of type 'r'.

tests/Internal.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{-# LANGUAGE OverloadedStrings #-}
1+
{-# LANGUAGE CPP,
2+
OverloadedStrings #-}
23

34
module Internal ( request
45
, errRsp
@@ -21,7 +22,10 @@ import qualified Data.HashMap.Strict as H
2122
import Data.Maybe (catMaybes)
2223
import qualified Data.Vector as V
2324
import Data.Text (Text)
25+
26+
#if !MIN_VERSION_base(4,8,0)
2427
import Control.Applicative ((<$>))
28+
#endif
2529

2630
array :: [A.Value] -> A.Value
2731
array = A.Array . V.fromList

tests/TestParallelism.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{-# LANGUAGE OverloadedStrings #-}
1+
{-# LANGUAGE CPP,
2+
OverloadedStrings #-}
23

34
module TestParallelism (testParallelizingTasks) where
45

@@ -11,12 +12,15 @@ import qualified Data.Aeson as A
1112
import Data.Aeson ((.=))
1213
import qualified Data.Aeson.Types as A
1314
import Data.Maybe (fromJust)
14-
import Control.Applicative ((<$>))
1515
import Control.Monad.Trans (liftIO)
1616
import Control.Concurrent (forkIO)
1717
import Control.Concurrent.MVar (MVar, newEmptyMVar, putMVar, takeMVar)
1818
import Test.HUnit (Assertion, assert)
1919

20+
#if !MIN_VERSION_base(4,8,0)
21+
import Control.Applicative ((<$>))
22+
#endif
23+
2024
-- | Tests parallelizing a batch request. Each request either
2125
-- locks or unlocks an MVar. The MVar is initially locked,
2226
-- so the first lock request cannot succeed if the requests

tests/TestSuite.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{-# LANGUAGE OverloadedStrings #-}
1+
{-# LANGUAGE CPP,
2+
OverloadedStrings #-}
23

34
module Main (main) where
45

@@ -16,7 +17,6 @@ import qualified Data.Aeson as A
1617
import Data.Aeson ((.=))
1718
import qualified Data.Aeson.Types as A
1819
import qualified Data.HashMap.Strict as H
19-
import Control.Applicative ((<$>))
2020
import Control.Monad.Trans (liftIO)
2121
import Control.Monad.State (State, runState, lift, modify)
2222
import Control.Monad.Identity (Identity, runIdentity)
@@ -25,6 +25,10 @@ import Test.Framework (defaultMain, Test)
2525
import Test.Framework.Providers.HUnit (testCase)
2626
import Prelude hiding (subtract)
2727

28+
#if !MIN_VERSION_base(4,8,0)
29+
import Control.Applicative ((<$>))
30+
#endif
31+
2832
main :: IO ()
2933
main = defaultMain $ errorHandlingTests ++ otherTests
3034

0 commit comments

Comments
 (0)