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


-- | Open a web browser from Haskell
--   
--   Open a web browser from Haskell. Windows, macOS, Linux and BSD are
--   supported.
@package open-browser
@version 0.4.0.0


-- | Open a web browser from Haskell. Supported operating systems are
--   Windows, macOS, Linux and BSD.
module Web.Browser

-- | Seeks to open the given item, silently. If the item is a URL or
--   another item associated with a web browser (for example, it represents
--   a local <tt>.html</tt> file), seeks to open it in the user's preferred
--   web browser. Returns whether or not the operation succeeded.
--   
--   No checks are performed on the nature or validity of the given item.
--   
--   Implemented using:
--   
--   <ul>
--   <li>on Windows, the 'open' operation provided by the Win32 API. For an
--   item that represents a file, equivalent double-clicking on the file's
--   icon;</li>
--   <li>on macOS, the 'open' application, if it is on the user's PATH. For
--   an item that represents a file, equivalent to double-clicking on the
--   file's icon; and</li>
--   <li>on Linux, FreeBSD, OpenBSD or NetBSD, the 'xdg-open' script, if it
--   is on the user's PATH.</li>
--   </ul>
--   
--   On other operating systems, the operation always fails.
openBrowser :: String -> IO Bool

-- | Exported to help with debugging. As for <a>openBrowser</a> but returns
--   either an exception or, as a triple, the <a>ExitCode</a> of the
--   opening mechanism and any output to the standard output and standard
--   error channels. On failure, the meaning of the exit code will depend
--   on the operating system; for unsupported operating systems, it will be
--   <a>ExitFailure</a> <tt>1</tt>.
openBrowserWithExitCode :: Exception e => String -> IO (Either e (ExitCode, String, String))
