-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Finding out the full path of the executable.
--   
--   The documentation of "System.Environment.getProgName" says that
--   "However, this is hard-to-impossible to implement on some non-Unix
--   OSes, so instead, for maximum portability, we just return the leafname
--   of the program as invoked." This library tries to provide the missing
--   path. Note: Since base 4.6.0.0, there is also a function
--   "System.Environment.getExecutablePath".
@package executable-path
@version 0.0.3.1


-- | The documentation of "System.Environment.getProgName" says that
--   
--   "However, this is hard-to-impossible to implement on some non-Unix
--   OSes, so instead, for maximum portability, we just return the leafname
--   of the program as invoked. Even then there are some differences
--   between platforms: on Windows, for example, a program invoked as foo
--   is probably really FOO.EXE, and that is what "getProgName" will
--   return."
--   
--   This library tries to fix this issue. It also provides some
--   platform-specific functions (most notably getting the path of the
--   application bundle on OSX). Supported operating systems:
--   
--   <ul>
--   <li>Win32 (tested on Windows 7)</li>
--   <li>Mac OS X</li>
--   <li>Linux</li>
--   <li>FreeBSD (tested on FreeBSD 6.4)</li>
--   <li>*BSD (with procfs mounted, plus fallback for certain shells;
--   untested)</li>
--   <li>Solaris (untested, and probably works on Solaris 10 only)</li>
--   </ul>
module System.Environment.Executable
getExecutablePath :: IO FilePath
splitExecutablePath :: IO (FilePath, FilePath)
data ScriptPath

-- | it was (probably) a proper compiled executable
Executable :: FilePath -> ScriptPath

-- | it was a script run by runghc/runhaskell
RunGHC :: FilePath -> ScriptPath

-- | we are in GHCi
Interactive :: ScriptPath

-- | An experimental hack which tries to figure out if the program was run
--   with <tt>runghc</tt> or <tt>runhaskell</tt> or <tt>ghci</tt>, and then
--   tries to find out the directory of the <i>source</i> (or object file).
--   
--   GHC only.
getScriptPath :: IO ScriptPath
instance GHC.Internal.Show.Show System.Environment.Executable.ScriptPath
