Generic formatter, can format an expression to any t as long as
t is an instance of IsString.
ModulePyF-0.11.5.0Haskell2010
PyF
A lot of quasiquoters to format and interpolate string expressions.
Contents
Synopsis
- value fmt
- value fmtTrim
- value str
- value strTrim
- value raw
- value trimIndent
- value mkFormatter
- value defaultConfig
- value fmtConfig
- value strConfig
- value addTrim
- value addFormatting
- PackagePyF-0.11.5.0
- Exports12
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourcePyF.hs
Format with whitespace trimming.
Multiline string, no interpolation.
Multiline string, no interpolation, but does indentation trimming.
Raw string, neither interpolation nor escaping is performed.
module PyF.Class
Whitespace utilities
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.
trimIndent "\n hello\n - a\n - b\n ""hello\n- a\n- b\n"
See fmtTrim for a quasiquoter with this behavior.
Configuration
This is an empty configuration. No formatting, no post processing
The config for fmt.
Configuration for str. It just wraps the multiline string with fromString.
Add indentation trimming to a configuration.
Enable formatting.