HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleshower-0.2.0.3Haskell2010

Shower

Pretty-print Show output and JSON.

  • 3 values
  • Packageshower-0.2.0.3
  • Exports3
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceShower.hs
valueshower :: Show a => a -> String
#

A drop-in replacement for show that has nice layout. NB: does not handle infinite data structures at the moment.

valueprinter :: Show a => a -> IO ()
#

A drop-in replacement for print that has nice layout. Use it in GHCi with -interactive-print=Shower.printer:

ghci> :set -interactive-print=Shower.printer
ghci> ([1..15], [a..z])
([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
 "abcdefghijklmnopqrstuvwxyz")

NB: does not handle infinite data structures at the moment.