{-# LANGUAGE CPP #-}
{-# LANGUAGE NoRebindableSyntax #-}
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
{-# OPTIONS_GHC -w #-}
module Paths_xmonad (
    version,
    getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
    getDataFileName, getSysconfDir
  ) where


import qualified Control.Exception as Exception
import qualified Data.List as List
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude


#if defined(VERSION_base)

#if MIN_VERSION_base(4,0,0)
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
#else
catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a
#endif

#else
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
#endif
catchIO :: forall a. IO a -> (IOException -> IO a) -> IO a
catchIO = forall e a. Exception e => IO a -> (e -> IO a) -> IO a
Exception.catch

version :: Version
version :: Version
version = [Int] -> [String] -> Version
Version [Int
0,Int
18,Int
0,Int
9] []

getDataFileName :: FilePath -> IO FilePath
getDataFileName :: String -> IO String
getDataFileName String
name = do
  String
dir <- IO String
getDataDir
  forall (m :: * -> *) a. Monad m => a -> m a
return (String
dir String -> String -> String
`joinFileName` String
name)

getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath



bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath
bindir :: String
bindir     = String
"/home/runner/work/xmonad-docs/xmonad-docs/.stack-work/install/x86_64-linux-tinfo6/72070e99c950c945c48afb5541d12be99243b9440e9b43ee80f8044ddacc36ac/9.2.8/bin"
libdir :: String
libdir     = String
"/home/runner/work/xmonad-docs/xmonad-docs/.stack-work/install/x86_64-linux-tinfo6/72070e99c950c945c48afb5541d12be99243b9440e9b43ee80f8044ddacc36ac/9.2.8/lib/x86_64-linux-ghc-9.2.8/xmonad-0.18.0.9-BNILLnUukAv89lwwEvgJK0"
dynlibdir :: String
dynlibdir  = String
"/home/runner/work/xmonad-docs/xmonad-docs/.stack-work/install/x86_64-linux-tinfo6/72070e99c950c945c48afb5541d12be99243b9440e9b43ee80f8044ddacc36ac/9.2.8/lib/x86_64-linux-ghc-9.2.8"
datadir :: String
datadir    = String
"/home/runner/work/xmonad-docs/xmonad-docs/.stack-work/install/x86_64-linux-tinfo6/72070e99c950c945c48afb5541d12be99243b9440e9b43ee80f8044ddacc36ac/9.2.8/share/x86_64-linux-ghc-9.2.8/xmonad-0.18.0.9"
libexecdir :: String
libexecdir = String
"/home/runner/work/xmonad-docs/xmonad-docs/.stack-work/install/x86_64-linux-tinfo6/72070e99c950c945c48afb5541d12be99243b9440e9b43ee80f8044ddacc36ac/9.2.8/libexec/x86_64-linux-ghc-9.2.8/xmonad-0.18.0.9"
sysconfdir :: String
sysconfdir = String
"/home/runner/work/xmonad-docs/xmonad-docs/.stack-work/install/x86_64-linux-tinfo6/72070e99c950c945c48afb5541d12be99243b9440e9b43ee80f8044ddacc36ac/9.2.8/etc"

getBinDir :: IO String
getBinDir     = forall a. IO a -> (IOException -> IO a) -> IO a
catchIO (String -> IO String
getEnv String
"xmonad_bindir")     (\IOException
_ -> forall (m :: * -> *) a. Monad m => a -> m a
return String
bindir)
getLibDir :: IO String
getLibDir     = forall a. IO a -> (IOException -> IO a) -> IO a
catchIO (String -> IO String
getEnv String
"xmonad_libdir")     (\IOException
_ -> forall (m :: * -> *) a. Monad m => a -> m a
return String
libdir)
getDynLibDir :: IO String
getDynLibDir  = forall a. IO a -> (IOException -> IO a) -> IO a
catchIO (String -> IO String
getEnv String
"xmonad_dynlibdir")  (\IOException
_ -> forall (m :: * -> *) a. Monad m => a -> m a
return String
dynlibdir)
getDataDir :: IO String
getDataDir    = forall a. IO a -> (IOException -> IO a) -> IO a
catchIO (String -> IO String
getEnv String
"xmonad_datadir")    (\IOException
_ -> forall (m :: * -> *) a. Monad m => a -> m a
return String
datadir)
getLibexecDir :: IO String
getLibexecDir = forall a. IO a -> (IOException -> IO a) -> IO a
catchIO (String -> IO String
getEnv String
"xmonad_libexecdir") (\IOException
_ -> forall (m :: * -> *) a. Monad m => a -> m a
return String
libexecdir)
getSysconfDir :: IO String
getSysconfDir = forall a. IO a -> (IOException -> IO a) -> IO a
catchIO (String -> IO String
getEnv String
"xmonad_sysconfdir") (\IOException
_ -> forall (m :: * -> *) a. Monad m => a -> m a
return String
sysconfdir)




joinFileName :: String -> String -> FilePath
joinFileName :: String -> String -> String
joinFileName String
""  String
fname = String
fname
joinFileName String
"." String
fname = String
fname
joinFileName String
dir String
""    = String
dir
joinFileName String
dir String
fname
  | Char -> Bool
isPathSeparator (forall a. [a] -> a
List.last String
dir) = String
dir forall a. [a] -> [a] -> [a]
++ String
fname
  | Bool
otherwise                       = String
dir forall a. [a] -> [a] -> [a]
++ Char
pathSeparator forall a. a -> [a] -> [a]
: String
fname

pathSeparator :: Char
pathSeparator :: Char
pathSeparator = Char
'/'

isPathSeparator :: Char -> Bool
isPathSeparator :: Char -> Bool
isPathSeparator Char
c = Char
c forall a. Eq a => a -> a -> Bool
== Char
'/'