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

ModulePyF-0.11.3.0Haskell2010

PyF

A lot of quasiquoters to format and interpolate string expressions.

  • 12 values
  • PackagePyF-0.11.3.0
  • Exports12
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourcePyF.hs
valuefmt :: QuasiQuoter
#

Generic formatter, can format an expression to any t as long as t is an instance of IsString.

valuestrTrim :: QuasiQuoter
#

Multiline string, no interpolation, but does indentation trimming.

valueraw :: QuasiQuoter
#

Raw string, neither interpolation nor escaping is performed.

module PyF.Class

Whitespace utilities

1 declaration
valuetrimIndent :: String -> String
#

Removes the trailing whitespace of a string.

  • First line is ignored if it only contains whitespaces

  • All other line common indentation is removed, ignoring lines with only whitespaces.

Example1 expression
trimIndent "\n   hello\n   - a\n   - b\n   ""hello\n- a\n- b\n"

See fmtTrim for a quasiquoter with this behavior.

Configuration

6 declarations
valuestrConfig :: Config
#

Configuration for str. It just wraps the multiline string with fromString.