diff options
author | lassulus <lassulus@lassul.us> | 2018-11-30 20:42:01 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-11-30 20:42:01 +0100 |
commit | 11aea15ec0207cbd081c0c1a8ba205f95308c7ae (patch) | |
tree | 1ce81d22809ad08482280f3844d781c42fca80df /tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs | |
parent | 8d87e4b8909adff80f9b9dd83fe177a3dff8918d (diff) | |
parent | 5d0bd94dd9002a0c65bdc76eedde15a07937087e (diff) |
Merge remote-tracking branch 'ni/master'
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"]) |