HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleecho-0.1.4Haskell2010

System.IO.Echo

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

  • 1 type
  • 8 values
  • Packageecho-0.1.4
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceEcho.hs

Public interface

7 declarations
datadata EchoState
#

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

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
valueechoOff :: EchoState
#

Indicates that the terminal's input echoing is (or should be) off.

valueechoOn :: EchoState
#

Indicates that the terminal's input echoing is (or should be) on.

Alternative interface

2 declarations
valuegetInputEcho :: IO Bool
#

Return whether the terminal's echoing is on (True) or off (False).

Note that while this works on MinTTY, it is not as efficient as getInputEchoState, as it involves a somewhat expensive substring computation.