diff options
author | Bodigrim <andrew.lelechenko@gmail.com> | 2022-05-27 21:09:33 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-28 21:01:58 -0400 |
commit | fbf2f254ec85bd696859f939698edfaef8ff708c (patch) | |
tree | 6a121769ce3cf11244c0a30d15de9d7dbd01cbc8 /libraries | |
parent | 6341c8ed5d3689c9cc52f4fcd2dce78a5f75b5a5 (diff) | |
download | haskell-fbf2f254ec85bd696859f939698edfaef8ff708c.tar.gz |
Expand documentation of hIsTerminalDevice
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/GHC/IO/Handle.hs | 9 |
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 |