HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleecho-0.1.4Haskell2010

System.IO.Echo.Internal

Exports functions that handle whether or not terminal input is handled in a way that should be portable across different platforms and consoles.

Unlike System.IO.Echo, this module exports internal functionality which, if used improperly, can lead to runtime errors. Make sure to read the documentation beforehand!

Contents
  1. Safe public interface
  2. Alternative (safe) interface
  3. Unsafe STTY internals
  4. MinTTY
Synopsis
  • Packageecho-0.1.4
  • Exports14
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs

Safe public interface

Alternative (safe) interface

Unsafe STTY internals

datadata EchoState

A representation of the terminal input's current echoing state. Example values include echoOff and echoOn.

Constructors

  • MinTTY STTYSettings

    The argument to (or value returned from) an invocation of the stty command-line utility. Most POSIX-like shells have stty, including MinTTY on Windows. Since neither hGetEcho nor hSetEcho work on MinTTY, when getInputEchoState runs on MinTTY, it returns a value built with this constructor.

    However, native Windows consoles like cmd.exe or PowerShell do not have stty, so if you construct an EchoState with this constructor manually, take care not to use it with a native Windows console.

  • DefaultTTY Bool

    A simple on (True) or off (False) toggle. This is returned by hGetEcho and given as an argument to hSetEcho, which work on most consoles, with the notable exception of MinTTY on Windows. If you construct an EchoState with this constructor manually, take care not to use it with MinTTY.

Instances3Eq, Ord, Show
  • Eq EchoStateDefined in echo-0.1.4 · System.IO.Echo.Internal
  • Ord EchoStateDefined in echo-0.1.4 · System.IO.Echo.Internal
  • Show EchoStateDefined in echo-0.1.4 · System.IO.Echo.Internal

MinTTY

valueminTTY :: Bool

Is the current process attached to a MinTTY console (e.g., Cygwin or MSYS)?