diff options
author | makefu <github@syntax-fehler.de> | 2018-12-05 16:41:38 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2018-12-05 16:41:38 +0100 |
commit | 48e1828a914159b7377d42ac7c34ef303a9b836f (patch) | |
tree | a5724be8669d0f1bd44910cddc2899eb72f1e8ab /tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs | |
parent | 1767369587d43aba5ec86780d85daf5e42812b8b (diff) | |
parent | 329abcefa2d6bc33f6fe55268f4019f65de1cd7e (diff) |
Merge remote-tracking branch 'lass/master' into HEAD
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"]) |