never executed always true always false
1 {-# LANGUAGE CPP #-}
2 {-# LANGUAGE NoRebindableSyntax #-}
3 {-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
4 {-# OPTIONS_GHC -w #-}
5 module Paths_conjure_cp (
6 version,
7 getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
8 getDataFileName, getSysconfDir
9 ) where
10
11
12 import qualified Control.Exception as Exception
13 import qualified Data.List as List
14 import Data.Version (Version(..))
15 import System.Environment (getEnv)
16 import Prelude
17
18
19 #if defined(VERSION_base)
20
21 #if MIN_VERSION_base(4,0,0)
22 catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
23 #else
24 catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a
25 #endif
26
27 #else
28 catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
29 #endif
30 catchIO = Exception.catch
31
32 version :: Version
33 version = Version [2,5,1] []
34
35 getDataFileName :: FilePath -> IO FilePath
36 getDataFileName name = do
37 dir <- getDataDir
38 return (dir `joinFileName` name)
39
40 getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
41
42
43
44 bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath
45 bindir = "/home/runner/work/conjure/conjure/.stack-work/install/x86_64-linux-tinfo6/643b6170b07206dc4e7fee00aac7d9a32927e9624190f3bca6a4282cdec145d7/9.4.8/bin"
46 libdir = "/home/runner/work/conjure/conjure/.stack-work/install/x86_64-linux-tinfo6/643b6170b07206dc4e7fee00aac7d9a32927e9624190f3bca6a4282cdec145d7/9.4.8/lib/x86_64-linux-ghc-9.4.8/conjure-cp"
47 dynlibdir = "/home/runner/work/conjure/conjure/.stack-work/install/x86_64-linux-tinfo6/643b6170b07206dc4e7fee00aac7d9a32927e9624190f3bca6a4282cdec145d7/9.4.8/lib/x86_64-linux-ghc-9.4.8"
48 datadir = "/home/runner/work/conjure/conjure/.stack-work/install/x86_64-linux-tinfo6/643b6170b07206dc4e7fee00aac7d9a32927e9624190f3bca6a4282cdec145d7/9.4.8/share/x86_64-linux-ghc-9.4.8/conjure-cp-2.5.1"
49 libexecdir = "/home/runner/work/conjure/conjure/.stack-work/install/x86_64-linux-tinfo6/643b6170b07206dc4e7fee00aac7d9a32927e9624190f3bca6a4282cdec145d7/9.4.8/libexec/x86_64-linux-ghc-9.4.8/conjure-cp-2.5.1"
50 sysconfdir = "/home/runner/work/conjure/conjure/.stack-work/install/x86_64-linux-tinfo6/643b6170b07206dc4e7fee00aac7d9a32927e9624190f3bca6a4282cdec145d7/9.4.8/etc"
51
52 getBinDir = catchIO (getEnv "conjure_cp_bindir") (\_ -> return bindir)
53 getLibDir = catchIO (getEnv "conjure_cp_libdir") (\_ -> return libdir)
54 getDynLibDir = catchIO (getEnv "conjure_cp_dynlibdir") (\_ -> return dynlibdir)
55 getDataDir = catchIO (getEnv "conjure_cp_datadir") (\_ -> return datadir)
56 getLibexecDir = catchIO (getEnv "conjure_cp_libexecdir") (\_ -> return libexecdir)
57 getSysconfDir = catchIO (getEnv "conjure_cp_sysconfdir") (\_ -> return sysconfdir)
58
59
60
61
62 joinFileName :: String -> String -> FilePath
63 joinFileName "" fname = fname
64 joinFileName "." fname = fname
65 joinFileName dir "" = dir
66 joinFileName dir fname
67 | isPathSeparator (List.last dir) = dir ++ fname
68 | otherwise = dir ++ pathSeparator : fname
69
70 pathSeparator :: Char
71 pathSeparator = '/'
72
73 isPathSeparator :: Char -> Bool
74 isPathSeparator c = c == '/'