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.Internal.PythonSyntax

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

  • 9 types
  • 1 value
  • PackagePyF-0.11.3.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