summaryrefslogtreecommitdiff
path: root/dist/build/autogen/Paths_hmj.hs
blob: 0ca6d46fbf04e425f422d9aa63f365d9973f7816 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
module Paths_hmj (
    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 [0,1,0,0] []
bindir, libdir, datadir, libexecdir, sysconfdir :: FilePath

bindir     = "/home/joe/.cabal/bin"
libdir     = "/home/joe/.cabal/lib/x86_64-linux-ghc-7.10.1/hmj_EJVUBKD2OSK8NwQkzGMiCB"
datadir    = "/home/joe/.cabal/share/x86_64-linux-ghc-7.10.1/hmj-0.1.0.0"
libexecdir = "/home/joe/.cabal/libexec"
sysconfdir = "/home/joe/.cabal/etc"

getBinDir, getLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
getBinDir = catchIO (getEnv "hmj_bindir") (\_ -> return bindir)
getLibDir = catchIO (getEnv "hmj_libdir") (\_ -> return libdir)
getDataDir = catchIO (getEnv "hmj_datadir") (\_ -> return datadir)
getLibexecDir = catchIO (getEnv "hmj_libexecdir") (\_ -> return libexecdir)
getSysconfDir = catchIO (getEnv "hmj_sysconfdir") (\_ -> return sysconfdir)

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