debian-3.93.2: Modules for working with the Debian package system

Safe HaskellSafe
LanguageHaskell98

Debian.Pretty

Description

A constructor we can wrap around values to avoid any built in Pretty instance - for example, instance Pretty [a].

  • display is now prettyShow
  • display' is now prettyText
  • ppDisplay is now ppShow
  • ppDisplay' is now ppText

Synopsis

Documentation

newtype PP a Source #

This type is wrapped around values before we pretty print them so we can write our own Pretty instances for common types without polluting the name space of clients of this package with instances they don't want.

Constructors

PP 

Fields

Instances

Functor PP Source # 

Methods

fmap :: (a -> b) -> PP a -> PP b #

(<$) :: a -> PP b -> PP a #

Pretty (PP [DebSource]) # 
Pretty (PP [ChangeLogEntry]) # 
Pretty (PP a) => Pretty (PP (Maybe a)) Source # 

Methods

pPrintPrec :: PrettyLevel -> Rational -> PP (Maybe a) -> Doc #

pPrint :: PP (Maybe a) -> Doc #

pPrintList :: PrettyLevel -> [PP (Maybe a)] -> Doc #

Pretty (PP String) Source # 
Pretty (PP Text) Source # 
Pretty (PP ChangeLog) # 
Pretty (PP ChangeLogEntry) # 
Pretty (PP ChangedFileSpec) # 
Pretty (PP ChangesFile) # 
Pretty (PP VersionReq) # 
Pretty (PP ArchitectureReq) # 
Pretty (PP BinPkgName) # 
Pretty (PP SrcPkgName) # 
Pretty (PP Relation) # 
Pretty (PP OrRelation) # 
Pretty (PP Relations) #

Wrap PP around type synonyms that might overlap with the `Pretty [a]` instance.

prettyShow :: Pretty a => a -> String #

Pretty print a value with the prettyNormal level.

ppPrint :: Pretty (PP a) => a -> Doc Source #

ppShow :: Pretty (PP a) => a -> String Source #

ppText :: Pretty (PP a) => a -> Text Source #