diff options
author | Bodigrim <andrew.lelechenko@gmail.com> | 2022-05-27 21:09:33 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-06-15 17:28:50 +0100 |
commit | cbed7afa71fe73196b6ea333ca57895adc055e4b (patch) | |
tree | a0131a0a9fb24ff1f85d0804253154adbb3f9614 | |
parent | 7ed8daa2cc25ceb4ba2ff0571b979899091f6485 (diff) | |
download | haskell-cbed7afa71fe73196b6ea333ca57895adc055e4b.tar.gz |
Expand documentation of hIsTerminalDevice
(cherry picked from commit fbf2f254ec85bd696859f939698edfaef8ff708c)
-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 |