HORIZON HASKELLDocslts/ghc-9.14.x99ffbb82026-10-19Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 99ffbb8 · 2026-10-19

I/O application-specific helpers

Read

valuehGetBytes :: Handle -> IO ByteString

Read some bytes from the console, and decode them if the encoding is recognized.

valuehGetPassphraseBytes
  1. :: (Handle, Handle)
  2. -> PassphraseInputMode
  3. -> PassphraseInput
  4. -> String
  5. -> PassphraseInfo
  6. -> IO ByteString

Read passphrase from either file or interactively, and decode them accoring to passphrase info.

Write

valuehPutString :: Handle -> String -> IO ()

Print string to the console with newline appended.

valuehPutStringNoNewLn :: Handle -> String -> IO ()

Print string to the console without newline appended.

I/O Helpers

valueprogName :: String

Get program name to avoid hard-coding it in documentation excerpt.

valuemarkCharsRedAtIndices :: Integral i => [i] -> String -> String

Mark all characters from a given string as red (in a console).