{-# LANGUAGE CPP #-}
{-# LANGUAGE NoRebindableSyntax #-}
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
{-# OPTIONS_GHC -Wno-missing-safe-haskell-mode #-}
module Paths_BNFC (
    version,
    getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
    getDataFileName, getSysconfDir
  ) where

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

#if defined(VERSION_base)

#if MIN_VERSION_base(4,0,0)
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
#else
catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a
#endif

#else
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
#endif
catchIO :: forall a. IO a -> (IOException -> IO a) -> IO a
catchIO = IO a -> (IOException -> IO a) -> IO a
forall e a. Exception e => IO a -> (e -> IO a) -> IO a
Exception.catch

version :: Version
version :: Version
version = [Int] -> [[Char]] -> Version
Version [Int
2,Int
9,Int
2] []
bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath

bindir :: [Char]
bindir     = [Char]
"/Users/abel/.cabal/bin"
libdir :: [Char]
libdir     = [Char]
"/Users/abel/.cabal/lib/x86_64-osx-ghc-9.0.1/BNFC-2.9.2-inplace"
dynlibdir :: [Char]
dynlibdir  = [Char]
"/Users/abel/.cabal/lib/x86_64-osx-ghc-9.0.1"
datadir :: [Char]
datadir    = [Char]
"/Users/abel/.cabal/share/x86_64-osx-ghc-9.0.1/BNFC-2.9.2"
libexecdir :: [Char]
libexecdir = [Char]
"/Users/abel/.cabal/libexec/x86_64-osx-ghc-9.0.1/BNFC-2.9.2"
sysconfdir :: [Char]
sysconfdir = [Char]
"/Users/abel/.cabal/etc"

getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
getBinDir :: IO [Char]
getBinDir = IO [Char] -> (IOException -> IO [Char]) -> IO [Char]
forall a. IO a -> (IOException -> IO a) -> IO a
catchIO ([Char] -> IO [Char]
getEnv [Char]
"BNFC_bindir") (\IOException
_ -> [Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
bindir)
getLibDir :: IO [Char]
getLibDir = IO [Char] -> (IOException -> IO [Char]) -> IO [Char]
forall a. IO a -> (IOException -> IO a) -> IO a
catchIO ([Char] -> IO [Char]
getEnv [Char]
"BNFC_libdir") (\IOException
_ -> [Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
libdir)
getDynLibDir :: IO [Char]
getDynLibDir = IO [Char] -> (IOException -> IO [Char]) -> IO [Char]
forall a. IO a -> (IOException -> IO a) -> IO a
catchIO ([Char] -> IO [Char]
getEnv [Char]
"BNFC_dynlibdir") (\IOException
_ -> [Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
dynlibdir)
getDataDir :: IO [Char]
getDataDir = IO [Char] -> (IOException -> IO [Char]) -> IO [Char]
forall a. IO a -> (IOException -> IO a) -> IO a
catchIO ([Char] -> IO [Char]
getEnv [Char]
"BNFC_datadir") (\IOException
_ -> [Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
datadir)
getLibexecDir :: IO [Char]
getLibexecDir = IO [Char] -> (IOException -> IO [Char]) -> IO [Char]
forall a. IO a -> (IOException -> IO a) -> IO a
catchIO ([Char] -> IO [Char]
getEnv [Char]
"BNFC_libexecdir") (\IOException
_ -> [Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
libexecdir)
getSysconfDir :: IO [Char]
getSysconfDir = IO [Char] -> (IOException -> IO [Char]) -> IO [Char]
forall a. IO a -> (IOException -> IO a) -> IO a
catchIO ([Char] -> IO [Char]
getEnv [Char]
"BNFC_sysconfdir") (\IOException
_ -> [Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
sysconfdir)

getDataFileName :: FilePath -> IO FilePath
getDataFileName :: [Char] -> IO [Char]
getDataFileName [Char]
name = do
  [Char]
dir <- IO [Char]
getDataDir
  [Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return ([Char]
dir [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
"/" [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
name)