dmcc 1.1.0.1 → 1.1.0.2
raw patch · 11 files changed
+47/−32 lines, 11 filesdep ~basedep ~http-clientdep ~lensPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: base, http-client, lens, network, time, xml-conduit
API changes (from Hackage documentation)
+ DMCC.Prelude: WrappedPoly :: f a -> WrappedPoly a
+ DMCC.Prelude: [WrappedMono] :: forall mono a. Element mono ~ a => mono -> WrappedMono mono a
+ DMCC.Prelude: [unwrapPoly] :: WrappedPoly a -> f a
+ DMCC.Prelude: data WrappedMono mono a
+ DMCC.Prelude: filterSet :: IsSet set => (Element set -> Bool) -> set -> set
+ DMCC.Prelude: newtype WrappedPoly (f :: Type -> Type) a
+ DMCC.Prelude: toNonEmpty :: MonoFoldable mono => NonNull mono -> NonEmpty (Element mono)
+ DMCC.Prelude: unwrapMono :: () => WrappedMono mono a -> mono
Files
- CHANGELOG.md +7/−0
- README.md +10/−1
- dmcc-ws/Main.hs +0/−2
- dmcc.cabal +8/−8
- src/DMCC/Agent.hs +6/−6
- src/DMCC/Agent.hs-boot +0/−2
- src/DMCC/Session.hs +1/−3
- src/DMCC/Types.hs +10/−6
- src/DMCC/XML/Raw.hs +5/−1
- src/DMCC/XML/Request.hs +0/−1
- src/DMCC/XML/Response.hs +0/−2
CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +## [1.1.0.2] - 2020-02-05++### Changed++- Dependencies bump+ ## [1.1.0.1] - 2019-02-08 ### Changed@@ -24,6 +30,7 @@ ## [1.0.0.0] - 2018-05-10 +[1.1.0.2]: https://github.com/f-me/dmcc/compare/1.1.0.1...1.1.0.2 [1.1.0.1]: https://github.com/f-me/dmcc/compare/1.1.0.0...1.1.0.1 [1.1.0.0]: https://github.com/f-me/dmcc/compare/1.0.0.1...1.1.0.0 [1.0.0.1]: https://github.com/f-me/dmcc/compare/1.0.0.0...1.0.0.1
README.md view
@@ -98,7 +98,16 @@ Client applications may use events to update their UI incrementally or re-process the whole state every time an event arrives. -## macOS+## Build++Use [Haskell Stack](https://www.haskellstack.org/) tool to build the+library and `dmcc-ws`:++```bash+stack install+```++### Developing on macOS On macOS with `openssl` installed via Homebrew, build with
dmcc-ws/Main.hs view
@@ -20,10 +20,8 @@ import qualified Data.ByteString.Lazy.Char8 as BL import qualified Data.Configurator as Cfg import qualified Data.Map as Map-import Data.Text (Text) import qualified Data.Text as T import Data.Version (showVersion)-import Data.String (fromString) import Network.WebSockets
dmcc.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: dmcc-version: 1.1.0.1+version: 1.1.0.2 license: BSD3 license-file: LICENSE maintainer: dima@dzhus.org@@ -43,26 +43,26 @@ build-depends: HsOpenSSL <0.12, aeson <1.5,- base <4.13,+ base <4.14, binary <0.9, bytestring <0.11, case-insensitive <1.3, classy-prelude <1.6, containers <0.7,- http-client <0.6,+ http-client <0.7, io-streams <1.6,- lens <4.18,+ lens <4.19, monad-control <1.1, monad-logger <0.4,- network <2.9,+ network <3.2, openssl-streams <1.3, safe-exceptions <0.2, stm <2.6, text <1.3,- time <1.9,+ time <1.10, transformers-base <0.5, unliftio <0.3,- xml-conduit <1.9,+ xml-conduit <1.10, xml-hamlet <0.6 executable dmcc-ws@@ -76,7 +76,7 @@ ghc-options: -Wall -Wcompat -Wno-missing-home-modules -threaded build-depends: aeson <1.5,- base <4.13,+ base <4.14, bytestring <0.11, classy-prelude <1.6, configurator <0.4,
src/DMCC/Agent.hs view
@@ -69,12 +69,12 @@ instance FromJSON AgentSnapshot where- parseJSON (Object o) =- AgentSnapshot- <$> Map.mapKeys CallId `liftM` (o .: "calls")- <*> (o .: "state")- parseJSON _ = fail "Could not parse AgentSnapshot from non-object"-+ parseJSON = withObject "AgentSnapshot" parseSnapshot+ where+ parseSnapshot o =+ AgentSnapshot+ <$> Map.mapKeys CallId `fmap` (o .: "calls")+ <*> (o .: "state") $(makeLenses ''AgentSnapshot)
src/DMCC/Agent.hs-boot view
@@ -6,8 +6,6 @@ import DMCC.Prelude -import Data.Text (Text)- import DMCC.Types import qualified DMCC.XML.Response as Rs import {-# SOURCE #-} DMCC.Session
src/DMCC/Session.hs view
@@ -29,13 +29,11 @@ import DMCC.Prelude import Control.Arrow ()-import Control.Concurrent.STM.TMVar (tryPutTMVar) -import Data.ByteString (ByteString) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import qualified Data.IntMap.Strict as IntMap-import Data.Text as T (Text, empty)+import Data.Text as T (empty) import Data.Typeable () import System.IO.Streams ( InputStream
src/DMCC/Types.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-}@@ -10,9 +11,11 @@ import DMCC.Prelude +#if MIN_VERSION_base(4,13,0)+import Control.Monad.Fail+#endif import Data.Aeson as A import Data.Aeson.TH-import Data.ByteString (ByteString) import Data.CaseInsensitive import Data.Data import Data.Text as T@@ -52,11 +55,12 @@ instance FromJSON Extension where- parseJSON (A.String s)- | T.length s > 30 = fail "Maximum extension length is 30 digits"- | (\c -> c `elem` (['0'..'9'] <> ['*', '#'])) `T.all` s = pure $ Extension s- | otherwise = fail "Extension must contain the digits 0-9, * or #"- parseJSON _ = fail "Could not parse extension"+ parseJSON = withText "Extension" parseExtension+ where+ parseExtension s+ | T.length s > 30 = fail "Maximum extension length is 30 digits"+ | (\c -> c `elem` (['0'..'9'] <> ['*', '#'])) `T.all` s = pure $ Extension s+ | otherwise = fail "Extension must contain the digits 0-9, * or #" newtype SwitchName =
src/DMCC/XML/Raw.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+ {-| DMCC request/response packet processing.@@ -15,7 +17,9 @@ module DMCC.XML.Raw where import DMCC.Prelude-+#if MIN_VERSION_base(4,13,0)+import Control.Monad.Fail+#endif import Data.Binary.Get import Data.Binary.Put import qualified Data.ByteString.Char8 as S
src/DMCC/XML/Request.hs view
@@ -14,7 +14,6 @@ import qualified Data.ByteString.Lazy as L import Data.CaseInsensitive import qualified Data.Map as Map-import Data.Text (Text) import qualified Data.Text as T import Text.Hamlet.XML
src/DMCC/XML/Response.hs view
@@ -12,10 +12,8 @@ import DMCC.Prelude -import Control.Exception (SomeException) import Data.CaseInsensitive (mk) import Data.List (foldl1')-import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Read as T