diff options
| author | jeschli <jeschli@gmail.com> | 2018-12-04 19:27:27 +0100 |
|---|---|---|
| committer | jeschli <jeschli@gmail.com> | 2018-12-04 19:27:27 +0100 |
| commit | 8ecc3901fd8bbd6172e6c32325aa3bc566c388de (patch) | |
| tree | 781f0a5fd3c27ba99072b75735981071db2cef5b /tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs | |
| parent | ebe6108a41748ae3f746ea3125216668542bcd4b (diff) | |
| parent | 006364274f516eb41def5f711c23b19e0b0a41f8 (diff) | |
Merge branch 'master' of prism.r:stockholm
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"]) |
