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

Moduleword-wrap-0.5Haskell2010

Text.Wrap

  • 3 types
  • 3 values
  • Packageword-wrap-0.5
  • Exports6
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceWrap.hs
datadata FillScope
#

To which lines should the fill strategy be applied?

Constructors

  • FillAfterFirst

    Apply any fill prefix only to lines after the first line (default)

  • FillAll

    Apply any fill prefix to all lines, even if there is only one line

Instances3Eq, Read, Show
datadata WrapSettings
#

Settings to control how wrapping is performed.

Constructors

Instances3Eq, Read, Show
valuewrapTextToLines :: WrapSettings -> Int -> Text -> [Text]
#

Wrap text at the specified width. Newlines and whitespace in the input text are preserved. Returns the lines of text in wrapped form. New lines introduced due to wrapping will have leading whitespace stripped prior to having any fill applied. Preserved indentation is always placed before any fill.