name:                json-rpc-client
version:             0.2.5.0
license:             MIT
license-file:        LICENSE
category:            Network, JSON
author:              Kristen Kozak
maintainer:          Kristen Kozak <grayjay@wordroute.com>
synopsis:            JSON-RPC 2.0 on the client side.
build-type:          Simple
extra-source-files:  changelog.md
cabal-version:       >=1.10
tested-with:         GHC == 7.0.4, GHC == 7.4.2, GHC == 7.6.3,
                     GHC == 7.8.3, GHC == 7.10.1
homepage:            https://github.com/grayjay/json-rpc-client
bug-reports:         https://github.com/grayjay/json-rpc-client/issues
description:         Functions for creating a JSON-RPC 2.0 client.  See
                     <http://www.jsonrpc.org/specification>. This library supports
                     batch requests and notifications, as well as single method
                     calls.  It also provides a function for creating corresponding
                     server-side methods with the package
                     <http://hackage.haskell.org/package/json-rpc-server json-rpc-server>.
                     This library does not handle transport, so a function for
                     communicating with the server must be provided.
                     The demo folder contains an example client and server that can
                     be compiled with the demo flag.  See "Network.JsonRpc.Client"
                     for details.

source-repository head
  type:              git
  location:          git://github.com/grayjay/json-rpc-client.git

flag demo
  description:       Builds the JSON-RPC demo client and server.
  default:           False
  manual:            True

library
  exposed-modules:     Network.JsonRpc.Client
                       Network.JsonRpc.ServerAdapter
  build-depends:       base >=4.3.1 && <4.10,
                       json-rpc-server >=0.2 && <0.3,
                       aeson >=0.7 && <1.2,
                       bytestring >=0.9.1 && <0.11,
                       mtl >=2.2.1 && <2.3,
                       text >=0.11.2 && <1.3,
                       unordered-containers >=0.2.3 && <0.3,
                       vector >=0.10 && <0.13,
                       vector-algorithms >=0.5.4 && <0.8
  hs-source-dirs:      src
  default-language:    Haskell2010
  ghc-options:         -Wall
  other-extensions:    CPP,
                       FlexibleContexts,
                       FlexibleInstances,
                       FunctionalDependencies,
                       MultiParamTypeClasses,
                       OverloadedStrings,
                       TypeOperators,
                       UndecidableInstances

executable demo-server
  hs-source-dirs:      demo
  main-is:             Server.hs
  other-modules:       Signatures
  if flag (demo)
    build-depends:       base,
                         json-rpc-client,
                         json-rpc-server,
                         aeson,
                         bytestring >=0.9.2,
                         mtl,
                         text
    default-language:    Haskell2010
    other-extensions:    OverloadedStrings,
                         TypeOperators
  else
    buildable:           False

executable demo-client
  hs-source-dirs:      demo
  main-is:             Client.hs
  other-modules:       Signatures
  if flag (demo)
    build-depends:       base,
                         json-rpc-client,
                         json-rpc-server,
                         process >=1.1.0 && <1.5,
                         aeson,
                         bytestring >=0.9.2,
                         mtl,
                         text
    default-language:    Haskell2010
    other-extensions:    OverloadedStrings,
                         TypeOperators
  else
    buildable:           False

test-suite tests
  hs-source-dirs:      tests
  main-is:             All.hs
  other-modules:       Tests, Properties
  type:                exitcode-stdio-1.0
  build-depends:       base,
                       json-rpc-client,
                       json-rpc-server,
                       aeson,
                       bytestring,
                       mtl,
                       scientific >=0.2 && <0.4,
                       text,
                       unordered-containers,
                       vector,
                       HUnit >=1.2.4 && <1.6,
                       QuickCheck >=2.4.2 && <2.10,
                       test-framework >=0.6 && <0.9,
                       test-framework-hunit >=0.3 && <0.4,
                       test-framework-quickcheck2 >=0.3 && <0.4
  default-language:    Haskell2010
  ghc-options:         -Wall -fno-warn-missing-signatures -fno-warn-orphans
  other-extensions:    CPP,
                       FlexibleContexts,
                       FlexibleInstances,
                       MultiParamTypeClasses,
                       OverloadedStrings,
                       TypeOperators,
                       TypeSynonymInstances,
                       UndecidableInstances