From d1ecceb0b985f02d28b86dc7be8a473a45c7ca4a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Nov 2018 09:03:52 +0100 Subject: tv xmonad: move to haskell packages --- tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs (limited to 'tv/5pkgs/haskell/xmonad-tv/src/Helpers/Path.hs') 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"]) -- cgit v1.2.3