summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/base/GHC/IO/Handle.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/libraries/base/GHC/IO/Handle.hs b/libraries/base/GHC/IO/Handle.hs
index 9bfb7df4cb..02242a93f2 100644
--- a/libraries/base/GHC/IO/Handle.hs
+++ b/libraries/base/GHC/IO/Handle.hs
@@ -563,7 +563,14 @@ hGetEcho handle = do
_ -> IODevice.getEcho haDevice
-- | Is the handle connected to a terminal?
-
+--
+-- On Windows the result of 'hIsTerminalDevide' might be misleading,
+-- because non-native terminals, such as MinTTY used in MSYS and Cygwin environments,
+-- are implemented via redirection.
+-- Use @System.Win32.Types.withHandleToHANDLE System.Win32.MinTTY.isMinTTYHandle@
+-- to recognise it. Also consider @ansi-terminal@ package for crossplatform terminal
+-- support.
+--
hIsTerminalDevice :: Handle -> IO Bool
hIsTerminalDevice handle =
withHandle_ "hIsTerminalDevice" handle $ \ Handle__{..} -> do