Check output device is a terminal: Difference between revisions
m
→{{header|Haskell}}: ( applied hindent )
mNo edit summary |
m (→{{header|Haskell}}: ( applied hindent )) |
||
Line 134:
main = do
istty <- queryTerminal stdOutput
putStrLn
(if istty
then "stdout is tty"▼
▲{{out}}
<pre>$ runhaskell istty.hs
stdout is tty
|