smsaero 0.1 → 0.1.1
raw patch · 3 files changed
+14/−4 lines, 3 files
Files
- README.md +9/−0
- smsaero.cabal +1/−1
- src/SMSAero/Utils.hs +4/−3
README.md view
@@ -1,8 +1,17 @@ # smsaero +[](http://hackage.haskell.org/package/smsaero) [](https://travis-ci.org/GetShopTV/smsaero) SMSAero API and HTTP client based on servant library.++## Documentation++The original SMSAero API documentation is available [here](http://smsaero.ru/api/description).++Library documentation is available [on Hackage](http://hackage.haskell.org/package/smsaero).++The most recent documentation is available [on GitHub pages](http://getshoptv.github.io/smsaero/docs/). ## Usage
smsaero.cabal view
@@ -1,5 +1,5 @@ name: smsaero-version: 0.1+version: 0.1.1 synopsis: SMSAero API and HTTP client based on servant library. description: Please see README.md homepage: https://github.com/GetShopTV/smsaero
src/SMSAero/Utils.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} module SMSAero.Utils where +import Control.Applicative import Servant.API.Alternative -- | Distribute a client looking like@@ -27,7 +28,7 @@ distributeClient = id instance (DistributiveClient (a -> b) b', DistributiveClient (a -> c) c') => DistributiveClient (a -> (b :<|> c)) (b' :<|> c') where- distributeClient client = distributeClient (aleft <$> client) :<|> distributeClient (aright <$> client)+ distributeClient client = distributeClient (left <$> client) :<|> distributeClient (right <$> client) where- aleft (l :<|> _) = l- aright (_ :<|> r) = r+ left (l :<|> _) = l+ right (_ :<|> r) = r