module Paths_fcm1 (
    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     = "C:\\Users\\vitek\\AppData\\Roaming\\cabal\\bin"
libdir     = "C:\\Users\\vitek\\AppData\\Roaming\\cabal\\x86_64-windows-ghc-7.10.2\\fcm1-0.1.0.0-DEMJej5TEBq5nNaGFJ4Sml"
datadir    = "C:\\Users\\vitek\\AppData\\Roaming\\cabal\\x86_64-windows-ghc-7.10.2\\fcm1-0.1.0.0"
libexecdir = "C:\\Users\\vitek\\AppData\\Roaming\\cabal\\fcm1-0.1.0.0-DEMJej5TEBq5nNaGFJ4Sml"
sysconfdir = "C:\\Users\\vitek\\AppData\\Roaming\\cabal\\etc"

getBinDir, getLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
getBinDir = catchIO (getEnv "fcm1_bindir") (\_ -> return bindir)
getLibDir = catchIO (getEnv "fcm1_libdir") (\_ -> return libdir)
getDataDir = catchIO (getEnv "fcm1_datadir") (\_ -> return datadir)
getLibexecDir = catchIO (getEnv "fcm1_libexecdir") (\_ -> return libexecdir)
getSysconfDir = catchIO (getEnv "fcm1_sysconfdir") (\_ -> return sysconfdir)

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