module Paths_stack (
    version,
    getBinDir, getLibDir, getDataDir, getLibexecDir,
    getDataFileName, getSysconfDir
  ) where

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

catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
catchIO = Exception.catch

version :: Version
version = Version [1,1,0] []
bindir, libdir, datadir, libexecdir, sysconfdir :: FilePath

bindir     = "/Users/manny/fpco/stack-release/.stack-work/install/x86_64-osx/lts-5.14/7.10.3/bin"
libdir     = "/Users/manny/fpco/stack-release/.stack-work/install/x86_64-osx/lts-5.14/7.10.3/lib/x86_64-osx-ghc-7.10.3/stack-1.1.0-1I3UQzKDqjy6BsBMiCen6O"
datadir    = "/Users/manny/fpco/stack-release/.stack-work/install/x86_64-osx/lts-5.14/7.10.3/share/x86_64-osx-ghc-7.10.3/stack-1.1.0"
libexecdir = "/Users/manny/fpco/stack-release/.stack-work/install/x86_64-osx/lts-5.14/7.10.3/libexec"
sysconfdir = "/Users/manny/fpco/stack-release/.stack-work/install/x86_64-osx/lts-5.14/7.10.3/etc"

getBinDir, getLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
getBinDir = catchIO (getEnv "stack_bindir") (\_ -> return bindir)
getLibDir = catchIO (getEnv "stack_libdir") (\_ -> return libdir)
getDataDir = catchIO (getEnv "stack_datadir") (\_ -> return datadir)
getLibexecDir = catchIO (getEnv "stack_libexecdir") (\_ -> return libexecdir)
getSysconfDir = catchIO (getEnv "stack_sysconfdir") (\_ -> return sysconfdir)

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