diff options
author | tv <tv@krebsco.de> | 2018-11-30 09:03:52 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2018-11-30 09:48:36 +0100 |
commit | d1ecceb0b985f02d28b86dc7be8a473a45c7ca4a (patch) | |
tree | 15299eeceb0297715e50800788bf6548262122b0 /tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs | |
parent | 26f6e0ffdb75300858764517d1c82819ee485a5e (diff) |
tv xmonad: move to haskell packages
Diffstat (limited to 'tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs')
-rw-r--r-- | tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs b/tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs new file mode 100644 index 0000000..1029d60 --- /dev/null +++ b/tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs @@ -0,0 +1,15 @@ +module Helpers.Path where + +import qualified Data.List +import qualified System.Directory +import qualified System.IO.Unsafe + + +findExecutable :: String -> FilePath +findExecutable = + System.IO.Unsafe.unsafePerformIO . find + where + find name = + maybe failure id <$> System.Directory.findExecutable name + where + failure = error (Data.List.intercalate " " [name, "not found"]) |