summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/System/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar/System/Utils.hs')
-rw-r--r--src/Xmobar/System/Utils.hs11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/Xmobar/System/Utils.hs b/src/Xmobar/System/Utils.hs
index 53052ea..24c655e 100644
--- a/src/Xmobar/System/Utils.hs
+++ b/src/Xmobar/System/Utils.hs
@@ -20,7 +20,6 @@
module Xmobar.System.Utils
( expandHome
, changeLoop
- , onSomeException
, safeIndex
) where
@@ -31,7 +30,6 @@ import Data.Maybe (fromMaybe)
import System.Environment
import System.FilePath
-import Control.Exception
expandHome :: FilePath -> IO FilePath
expandHome ('~':'/':path) = fmap (</> path) (getEnv "HOME")
@@ -47,15 +45,6 @@ changeLoop s f = atomically s >>= go
guard (new /= old)
return new)
--- | Like 'finally', but only performs the final action if there was an
--- exception raised by the computation.
---
--- Note that this implementation is a slight modification of
--- onException function.
-onSomeException :: IO a -> (SomeException -> IO b) -> IO a
-onSomeException io what = io `catch` \e -> do _ <- what e
- throwIO (e :: SomeException)
-
(!!?) :: [a] -> Int -> Maybe a
(!!?) xs i
| i < 0 = Nothing