HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulecardano-addresses-4.0.2Haskell2010

System.IO.Extra

  • 17 values

I/O application-specific helpers

0 declarations

Read

valuehGetBytes :: Handle -> IO ByteString
#

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

valuehGetScriptHash :: Handle -> IO ScriptHash
#

Read a script hash from the console, or fail.

valuehGetSomeMnemonic :: Handle -> IO SomeMnemonic
#

Read some English mnemonic words from the console, or fail.

valuehGetSomeMnemonicInteractively
  1. :: (Handle, Handle)
  2. -> PassphraseInputMode
  3. -> String
  4. -> IO SomeMnemonic
#

Prompt user and read some English mnemonic words from stdin.

valuehGetPassphraseMnemonic
  1. :: (Handle, Handle)
  2. -> PassphraseInputMode
  3. -> PassphraseInput
  4. -> String
  5. -> IO SomeMnemonic
#

Read mnemonic passphrase from either file or interactively.

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

valuehPutBytes :: Handle -> ByteString -> Encoding -> IO ()
#

Print bytes to the console with the given encoding.

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

4 declarations
valueprettyIOException :: IOException -> IO a
#

Fail with a colored red error message.

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).