summaryrefslogtreecommitdiff
path: root/Presence/LocalPeerCred.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2018-06-21 01:26:58 -0400
committerjoe <joe@jerkface.net>2018-06-21 02:56:33 -0400
commit8cdc2de72ebe8945ce4b9f7fe8890970c34135a1 (patch)
tree99d8cbbaa46f089716f101058d0442b28f762bd8 /Presence/LocalPeerCred.hs
parent458c7a99e07300cde99826f825c3d0d6a7eab298 (diff)
Avoid awkward "flip (maybe ...)" pattern.
Diffstat (limited to 'Presence/LocalPeerCred.hs')
-rw-r--r--Presence/LocalPeerCred.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Presence/LocalPeerCred.hs b/Presence/LocalPeerCred.hs
index 9054f180..f68557e8 100644
--- a/Presence/LocalPeerCred.hs
+++ b/Presence/LocalPeerCred.hs
@@ -126,7 +126,7 @@ identifyTTY ::
126identifyTTY tty_pids uid inode = do 126identifyTTY tty_pids uid inode = do
127 pid <- scanProc (show uid) (L.unpack inode) 127 pid <- scanProc (show uid) (L.unpack inode)
128 -- putStrLn $ "scanProc --> "++show pid 128 -- putStrLn $ "scanProc --> "++show pid
129 flip (maybe (return (Nothing,Nothing))) pid $ \(pid,ttydev) -> do 129 fromMaybe (return (Nothing,Nothing)) $ pid <&> \(pid,ttydev) -> do
130 tty <- ttyOrDisplay pid ttydev 130 tty <- ttyOrDisplay pid ttydev
131 -- putStrLn $ "users = " ++ show tty_pids 131 -- putStrLn $ "users = " ++ show tty_pids
132 dts <- ttyToXorgs tty_pids 132 dts <- ttyToXorgs tty_pids