HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

ModulePyF-0.11.5.0Haskell2010

PyF.Internal.PythonSyntax

This module provides a parser for python format string mini language.

  • 9 types
  • 1 value
  • PackagePyF-0.11.5.0
  • Exports11
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourcePythonSyntax.hs

Parse a string, returns a list of raw string or replacement fields

Example2 expressions
import Text.Megaparsecparse parsePythonFormatString "" "hello {1+1:>10.2f}"Right [       Raw "hello ",       Replacement "1+1"       (       Just (FormatMode                      (Padding 10 (Just (Nothing,AnyAlign AlignRight)))                      (FixedF (Precision 2) NormalForm Minus)                       Nothing))]
datadata Item
#

A format string is composed of many chunks of raw string or replacement

Constructors

datadata TypeFormat
#

All formatting type

Constructors

Instances1Data