Skip to content

Commit

Permalink
Fix example in package description
Browse files Browse the repository at this point in the history
  • Loading branch information
rblaze committed Apr 5, 2020
1 parent 3a4e45a commit d5c3c8f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dbus.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ description:
.
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)
@
.
Expand Down

0 comments on commit d5c3c8f

Please sign in to comment.