module Paths_uuagc_bootstrap (
    version,
    getBinDir, getLibDir, getDataDir, getLibexecDir,
    getDataFileName
  ) where

import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
catchIO = Exception.catch


version :: Version
version = Version {versionBranch = [0,9,39,1,0], versionTags = []}
bindir, libdir, datadir, libexecdir :: FilePath

bindir     = "/usr/local/tmp/archive/install/bin"
libdir     = "/usr/local/tmp/archive/install/lib/uuagc-bootstrap-0.9.39.1.0/ghc-7.2.2"
datadir    = "/usr/local/tmp/archive/install/share/uuagc-bootstrap-0.9.39.1.0"
libexecdir = "/usr/local/tmp/archive/install/libexec"

getBinDir, getLibDir, getDataDir, getLibexecDir :: IO FilePath
getBinDir = catchIO (getEnv "uuagc_bootstrap_bindir") (\_ -> return bindir)
getLibDir = catchIO (getEnv "uuagc_bootstrap_libdir") (\_ -> return libdir)
getDataDir = catchIO (getEnv "uuagc_bootstrap_datadir") (\_ -> return datadir)
getLibexecDir = catchIO (getEnv "uuagc_bootstrap_libexecdir") (\_ -> return libexecdir)

getDataFileName :: FilePath -> IO FilePath
getDataFileName name = do
  dir <- getDataDir
  return (dir ++ "/" ++ name)