    {-# LANGUAGE CPP #-}
    {-# LANGUAGE NoRebindableSyntax #-}
    {-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
    {-# OPTIONS_GHC -w #-}
    module Paths_openapi_petstore (
        version,
        getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
        getDataFileName, getSysconfDir
      ) where

    import qualified Control.Exception as Exception
    import qualified Data.List as List
    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] -> [String] -> Version
    Version [Int
    0,Int
    1,Int
    0,Int
    0] []

    getDataFileName :: FilePath -> IO FilePath
    getDataFileName :: String -> IO String
    getDataFileName String
    name = do
      String
    dir <- IO String
    getDataDir
      String -> IO String
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (String
    dir String -> String -> String
    `joinFileName` String
    name)

    getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath

    bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath
    bindir :: String
    bindir     = String
    "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/86de22758d19d22e98fea9acfb600194ce9ad9a3ce19a581161d1bf31c4ac035/9.4.5/bin"
    libdir :: String
    libdir     = String
    "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/86de22758d19d22e98fea9acfb600194ce9ad9a3ce19a581161d1bf31c4ac035/9.4.5/lib/x86_64-linux-ghc-9.4.5/openapi-petstore-0.1.0.0-CXAPG0SOw20QY3Hna0VsF"
    dynlibdir :: String
    dynlibdir  = String
    "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/86de22758d19d22e98fea9acfb600194ce9ad9a3ce19a581161d1bf31c4ac035/9.4.5/lib/x86_64-linux-ghc-9.4.5"
    datadir :: String
    datadir    = String
    "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/86de22758d19d22e98fea9acfb600194ce9ad9a3ce19a581161d1bf31c4ac035/9.4.5/share/x86_64-linux-ghc-9.4.5/openapi-petstore-0.1.0.0"
    libexecdir :: String
    libexecdir = String
    "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/86de22758d19d22e98fea9acfb600194ce9ad9a3ce19a581161d1bf31c4ac035/9.4.5/libexec/x86_64-linux-ghc-9.4.5/openapi-petstore-0.1.0.0"
    sysconfdir :: String
    sysconfdir = String
    "/home/jon/fs/git/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work/install/x86_64-linux-tinfo6/86de22758d19d22e98fea9acfb600194ce9ad9a3ce19a581161d1bf31c4ac035/9.4.5/etc"

    getBinDir :: IO String
    getBinDir     = IO String -> (IOException -> IO String) -> IO String
    forall a. IO a -> (IOException -> IO a) -> IO a
    catchIO (String -> IO String
    getEnv String
    "openapi_petstore_bindir")     (\IOException
    _ -> String -> IO String
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return String
    bindir)
    getLibDir :: IO String
    getLibDir     = IO String -> (IOException -> IO String) -> IO String
    forall a. IO a -> (IOException -> IO a) -> IO a
    catchIO (String -> IO String
    getEnv String
    "openapi_petstore_libdir")     (\IOException
    _ -> String -> IO String
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return String
    libdir)
    getDynLibDir :: IO String
    getDynLibDir  = IO String -> (IOException -> IO String) -> IO String
    forall a. IO a -> (IOException -> IO a) -> IO a
    catchIO (String -> IO String
    getEnv String
    "openapi_petstore_dynlibdir")  (\IOException
    _ -> String -> IO String
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return String
    dynlibdir)
    getDataDir :: IO String
    getDataDir    = IO String -> (IOException -> IO String) -> IO String
    forall a. IO a -> (IOException -> IO a) -> IO a
    catchIO (String -> IO String
    getEnv String
    "openapi_petstore_datadir")    (\IOException
    _ -> String -> IO String
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return String
    datadir)
    getLibexecDir :: IO String
    getLibexecDir = IO String -> (IOException -> IO String) -> IO String
    forall a. IO a -> (IOException -> IO a) -> IO a
    catchIO (String -> IO String
    getEnv String
    "openapi_petstore_libexecdir") (\IOException
    _ -> String -> IO String
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return String
    libexecdir)
    getSysconfDir :: IO String
    getSysconfDir = IO String -> (IOException -> IO String) -> IO String
    forall a. IO a -> (IOException -> IO a) -> IO a
    catchIO (String -> IO String
    getEnv String
    "openapi_petstore_sysconfdir") (\IOException
    _ -> String -> IO String
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return String
    sysconfdir)

    joinFileName :: String -> String -> FilePath
    joinFileName :: String -> String -> String
    joinFileName String
    ""  String
    fname = String
    fname
    joinFileName String
    "." String
    fname = String
    fname
    joinFileName String
    dir String
    ""    = String
    dir
    joinFileName String
    dir String
    fname
      | Char -> Bool
    isPathSeparator (String -> Char
    forall a. HasCallStack => [a] -> a
    List.last String
    dir) = String
    dir String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    fname
      | Bool
    otherwise                       = String
    dir String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ Char
    pathSeparator Char -> String -> String
    forall a. a -> [a] -> [a]
    : String
    fname

    pathSeparator :: Char
    pathSeparator :: Char
    pathSeparator = Char
    '/'

    isPathSeparator :: Char -> Bool
    isPathSeparator :: Char -> Bool
    isPathSeparator Char
    c = Char
    c Char -> Char -> Bool
    forall a. Eq a => a -> a -> Bool
    == Char
    '/'