summaryrefslogtreecommitdiffhomepage
path: root/src/IPC
diff options
context:
space:
mode:
authorJochen Keil <jochen.keil@gmail.com>2012-08-10 11:37:22 +0200
committerJochen Keil <jochen.keil@gmail.com>2012-08-10 11:37:22 +0200
commit1f603c25eea15d302a4aa1ebb879bbd8198a3b82 (patch)
treed431e434b0b86a1b3197a3996f15d34743e7ae48 /src/IPC
parenta7158c426ae008fb268f603f75d027683f726757 (diff)
downloadxmobar-1f603c25eea15d302a4aa1ebb879bbd8198a3b82.tar.gz
xmobar-1f603c25eea15d302a4aa1ebb879bbd8198a3b82.tar.bz2
Move safeHead to Plugins.Utils
safeHead is a very general utility function with suits better into a common Util module.
Diffstat (limited to 'src/IPC')
-rw-r--r--src/IPC/DBus.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/IPC/DBus.hs b/src/IPC/DBus.hs
index 64e3cca..4357c48 100644
--- a/src/IPC/DBus.hs
+++ b/src/IPC/DBus.hs
@@ -20,10 +20,7 @@ import Control.Monad ((>=>), join, when)
import Control.Concurrent
import Signal
-
-safeHead :: [a] -> Maybe a
-safeHead [] = Nothing
-safeHead (x:_) = Just x
+import Plugins.Utils (safeHead)
instance IsVariant SignalType where
toVariant = toVariant . show