hlint
This commit is contained in:
parent
f5b1c3841e
commit
72ec0ab736
12 changed files with 18 additions and 17 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
module Utility.DBus where
|
||||
|
||||
import Utility.PartialPrelude
|
||||
import Utility.Exception
|
||||
|
||||
import DBus.Client
|
||||
|
@ -22,7 +23,7 @@ type ServiceName = String
|
|||
listServiceNames :: Client -> IO [ServiceName]
|
||||
listServiceNames client = do
|
||||
reply <- callDBus client "ListNames" []
|
||||
return $ fromMaybe [] $ fromVariant (methodReturnBody reply !! 0)
|
||||
return $ fromMaybe [] $ fromVariant =<< headMaybe (methodReturnBody reply)
|
||||
|
||||
callDBus :: Client -> MemberName -> [Variant] -> IO MethodReturn
|
||||
callDBus client name params = call_ client $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue