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


-- | A reliable way to detect the presence of a MinTTY console on Windows
--   
--   MinTTY is a Windows-specific terminal emulator for the widely used
--   Cygwin and MSYS projects, which provide Unix-like environments for
--   Windows. MinTTY consoles behave differently from native Windows
--   consoles (such as <tt>cmd.exe</tt> or PowerShell) in many ways, and in
--   some cases, these differences make it necessary to treat MinTTY
--   consoles differently in code.
--   
--   The <tt>mintty</tt> library provides a simple way to detect if your
--   code in running in a MinTTY console on Windows. It exports
--   <tt>isMinTTY</tt>, which does the right thing 90% of the time (by
--   checking if standard error is attached to MinTTY), and it also exports
--   <tt>isMinTTYHandle</tt> for the other 10% of the time (when you want
--   to check is some arbitrary handle is attached to MinTTY). As you might
--   expect, both of these functions will simply return <tt>False</tt> on
--   any non-Windows operating system.
@package mintty
@version 0.1.1


-- | Exports functions that check if a process or handle is attached to a
--   MinTTY console on Windows, such as Cygwin or MSYS. On non-Windows
--   operating systems, the functions in this module will simply return
--   <a>False</a>.
module System.Console.MinTTY

-- | Returns <a>True</a> if the current process's standard error is
--   attached to a MinTTY console (e.g., Cygwin or MSYS). Returns
--   <a>False</a> otherwise.
isMinTTY :: IO Bool

-- | Returns <a>True</a> is the given handle is attached to a MinTTY
--   console (e.g., Cygwin or MSYS). Returns <a>False</a> otherwise.
isMinTTYHandle :: HANDLE -> IO Bool
type HANDLE = Ptr ()
