1 {-# LANGUAGE CPP #-}
    2 {-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
    3 {-# OPTIONS_GHC -fno-warn-implicit-prelude #-}
    4 module Paths_databrary (
    5     version,
    6     getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
    7     getDataFileName, getSysconfDir
    8   ) where
    9 
   10 import qualified Control.Exception as Exception
   11 import Data.Version (Version(..))
   12 import System.Environment (getEnv)
   13 import Prelude
   14 
   15 #if defined(VERSION_base)
   16 
   17 #if MIN_VERSION_base(4,0,0)
   18 catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
   19 #else
   20 catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a
   21 #endif
   22 
   23 #else
   24 catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
   25 #endif
   26 catchIO = Exception.catch
   27 
   28 version :: Version
   29 version = Version [1] []
   30 bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath
   31 
   32 bindir     = "/home/centos/.cabal/bin"
   33 libdir     = "/home/centos/.cabal/lib/x86_64-linux-ghc-8.0.2/databrary-1-CKdn4uB613l7rh0y53TmMA"
   34 dynlibdir  = "/home/centos/.cabal/lib/x86_64-linux-ghc-8.0.2"
   35 datadir    = "./."
   36 libexecdir = "/home/centos/.cabal/libexec/x86_64-linux-ghc-8.0.2/databrary-1"
   37 sysconfdir = "/home/centos/.cabal/etc"
   38 
   39 getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
   40 getBinDir = catchIO (getEnv "databrary_bindir") (\_ -> return bindir)
   41 getLibDir = catchIO (getEnv "databrary_libdir") (\_ -> return libdir)
   42 getDynLibDir = catchIO (getEnv "databrary_dynlibdir") (\_ -> return dynlibdir)
   43 getDataDir = catchIO (getEnv "databrary_datadir") (\_ -> return datadir)
   44 getLibexecDir = catchIO (getEnv "databrary_libexecdir") (\_ -> return libexecdir)
   45 getSysconfDir = catchIO (getEnv "databrary_sysconfdir") (\_ -> return sysconfdir)
   46 
   47 getDataFileName :: FilePath -> IO FilePath
   48 getDataFileName name = do
   49   dir <- getDataDir
   50   return (dir ++ "/" ++ name)