packages feed

dbus 1.2.13 → 1.2.14

raw patch · 2 files changed

+21/−13 lines, 2 filesdep ~template-haskellPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: template-haskell

API changes (from Hackage documentation)

+ DBus.Generation: mkTupE :: [Exp] -> Exp

Files

dbus.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.8 name: dbus-version: 1.2.13+version: 1.2.14 license: Apache-2.0 license-file: license.txt maintainer: Andrey Sverdlichenko <blaze@ruddy.ru>@@ -31,18 +31,18 @@     .     main = do     &#x20;   client <- connectSession-    &#x20;   //-    &#x20;   \-- Request a list of connected clients from the bus+    &#x20;+    &#x20;   -- Request a list of connected clients from the bus     &#x20;   reply <- call_ client (methodCall \"\/org\/freedesktop\/DBus\" \"org.freedesktop.DBus\" \"ListNames\")     &#x20;       &#x7b; methodCallDestination = Just \"org.freedesktop.DBus\"     &#x20;       &#x7d;-    &#x20;   //-    &#x20;   \-- org.freedesktop.DBus.ListNames() returns a single value, which is-    &#x20;   \-- a list of names (here represented as [String])+    &#x20;+    &#x20;   -- org.freedesktop.DBus.ListNames() returns a single value, which is+    &#x20;   -- a list of names (here represented as [String])     &#x20;   let Just names = fromVariant (methodReturnBody reply !! 0)-    &#x20;   //-    &#x20;   \-- Print each name on a line, sorted so reserved names are below-    &#x20;   \-- temporary names.+    &#x20;+    &#x20;   -- Print each name on a line, sorted so reserved names are below+    &#x20;   -- temporary names.     &#x20;   mapM_ putStrLn (sort names)     @     .@@ -104,7 +104,7 @@         parsec <3.2,         random <1.2,         split <0.3,-        template-haskell <2.16.0.0,+        template-haskell <2.17.0.0,         text <1.3,         th-lift <0.9,         transformers <0.6,
lib/DBus/Generation.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module DBus.Generation where@@ -26,6 +27,13 @@ import           Prelude hiding (mapM) import           System.Posix.Types (Fd(..)) +-- | Compatibility helper to create (total) tuple expressions+mkTupE :: [Exp] -> Exp+mkTupE = TupE+#if MIN_VERSION_template_haskell(2,16,0)+         . map Just+#endif+ type ClientBusPathR a = ReaderT (Client, T.BusName, T.ObjectPath) IO a  dbusInvoke :: (Client -> T.BusName -> T.ObjectPath -> a) -> ClientBusPathR a@@ -232,8 +240,8 @@     finalOutputNames <- buildOutputNames     let variantListExp = map makeToVariantApp methodArgNames         mapOrHead' = mapOrHead outputLength-        fromVariantExp = mapOrHead' makeFromVariantApp fromVariantOutputNames TupE-        finalResultTuple = mapOrHead' VarE finalOutputNames TupE+        fromVariantExp = mapOrHead' makeFromVariantApp fromVariantOutputNames mkTupE+        finalResultTuple = mapOrHead' VarE finalOutputNames mkTupE         maybeExtractionPattern = mapOrHead' makeJustPattern finalOutputNames TupP         getMethodCallDefDec = [d|                $( varP methodCallDefN ) =@@ -432,7 +440,7 @@                      }                  |]     let mapOrHead' = mapOrHead argCount-        fromVariantExp = mapOrHead' makeFromVariantApp fromVariantOutputNames TupE+        fromVariantExp = mapOrHead' makeFromVariantApp fromVariantOutputNames mkTupE         maybeExtractionPattern = mapOrHead' makeJustPattern toHandlerOutputNames TupP         applyToName toApply n = AppE toApply $ VarE n         finalApplication = foldl applyToName (VarE handlerArgN)