HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleghc-boot-th-10.0.0.20260917Haskell2010

GHC.Boot.TH.PprLib

Monadic front-end to Text.PrettyPrint

Contents
  1. The document type
  2. Primitive Documents
  3. Converting values into documents
  4. Wrapping documents in delimiters
  5. Combining documents
  6. Predicates on documents
Synopsis

The document type

datadata PprM a
#
Instances4Monad, Functor, Show, Applicative
  • Monad PprMDefined in ghc-boot-th-10.0.0.20260917 · GHC.Boot.TH.PprLib
  • Functor PprMDefined in ghc-boot-th-10.0.0.20260917 · GHC.Boot.TH.PprLib
  • Show DocDefined in ghc-boot-th-10.0.0.20260917 · GHC.Boot.TH.PprLib
  • Applicative PprMDefined in ghc-boot-th-10.0.0.20260917 · GHC.Boot.TH.PprLib

Primitive Documents

Converting values into documents

Wrapping documents in delimiters

Combining documents

value($$)
  1. :: Doc
  2. -> Doc
  3. -> Doc

    Above; if there is no overlap it "dovetails" the two

#
valuefsep
  1. :: [Doc]
  2. -> Doc

    "Paragraph fill" version of sep

#
valuefcat
  1. :: [Doc]
  2. -> Doc

    "Paragraph fill" version of cat

#
valuepunctuate
  1. :: Doc
  2. -> [Doc]
  3. -> [Doc]
    punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn]
#

Predicates on documents