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

import Data.Version (Version(..))
import System.Environment (getEnv)

version :: Version
version = Version {versionBranch = [0,1], versionTags = []}

bindir, libdir, datadir, libexecdir :: FilePath

bindir     = "/home/singpolyma/.cabal/bin"
libdir     = "/home/singpolyma/.cabal/lib/bitbrawl-0.1/ghc-7.0.3"
datadir    = "/home/singpolyma/.cabal/share/bitbrawl-0.1"
libexecdir = "/home/singpolyma/.cabal/libexec"

getBinDir, getLibDir, getDataDir, getLibexecDir :: IO FilePath
getBinDir = catch (getEnv "bitbrawl_bindir") (\_ -> return bindir)
getLibDir = catch (getEnv "bitbrawl_libdir") (\_ -> return libdir)
getDataDir = catch (getEnv "bitbrawl_datadir") (\_ -> return datadir)
getLibexecDir = catch (getEnv "bitbrawl_libexecdir") (\_ -> return libexecdir)

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