Use same manager for multiple requests.
[haskell-cryptsy-api.git] / src / Cryptsy / API / Public.hs
blobde78898e7821727d8b790e5811f5595229a6168e
1 -- |Re-exports the entire Cryptsy.API.Public.* heirarchy.
2 module Cryptsy.API.Public
3 ( module Cryptsy.API.Public.Types
4 , module Cryptsy.API.Public.MarketData.Old
5 , module Cryptsy.API.Public.MarketData.New
6 , module Cryptsy.API.Public.Market
7 , module Cryptsy.API.Public.OrderData
8 , module Cryptsy.API.Public.OrderBook
9 , defaultEvalPubCryptsy
11 where
13 -- either
14 import Control.Monad.Trans.Either (runEitherT)
16 -- http-client
17 import Network.HTTP.Client (withManager)
19 -- http-client-tls
20 import Network.HTTP.Client.TLS (tlsManagerSettings)
22 -- transformers
23 import Control.Monad.Trans.Reader (runReaderT)
25 -- this package
26 import Cryptsy.API.Public.Market
27 import Cryptsy.API.Public.MarketData.New
28 import Cryptsy.API.Public.MarketData.Old
29 import Cryptsy.API.Public.OrderBook
30 import Cryptsy.API.Public.OrderData
31 import Cryptsy.API.Public.Types
33 defaultEvalPubCryptsy :: PubCryptsy a -> IO (Either CryptsyError a)
34 defaultEvalPubCryptsy = withManager tlsManagerSettings . (runEitherT .) . runReaderT