| Safe Haskell | Safe-Infered |
|---|
NLP.GenI.Pretty
Description
This is not a proper pretty printer. I aim is to replace this with a (de-facto) standard library if one should appear
Documentation
class Pretty a where
An alternative Show instance (the idea being that we
should reserve Show for outputting actual Haskell)
Instances
| Pretty Int | |
| Pretty Integer | |
| Pretty String | |
| Pretty Text | |
| Pretty PolarityKey | |
| Pretty GeniVal | |
| Pretty SemInput | |
| Pretty Sem | |
| Pretty LexCombineError2 | |
| Pretty LexCombineError | |
| Pretty LexEntry | |
| Pretty GenStatus | |
| Pretty RankedOtConstraint | |
| Pretty OtConstraint | |
| Pretty GeniError | |
| Pretty [TagSite] | |
| Pretty (FeatStruct GeniVal) | |
| Pretty (AvPair GeniVal) | |
| Pretty (Flist GeniVal) | |
| Pretty (Literal GeniVal) | |
| Pretty (GNode GeniVal) | The default show for GNode tries to be very compact; it only shows the value for cat attribute and any flags which are marked on that node. This is one the places where the pretty representation of a GenI object is different from its GenI-format one |
| GeniShow sem => Pretty (TestCase sem) |
Separated by space unless one of them is empty (in which case just the non-empty one)
squeezed :: Int -> [Text] -> Text
Puts list items on the same line if they are smaller than a certain width otherwise, puts a newline in between them
prettyCount :: (a -> Text) -> Text -> (a, Int) -> Text
prettyCount toBlah "" (x,1) == "blah" prettyCount toBlah "foos" (x,1) == "blah" prettyCount toBlah "" (x,4) == "blah ×4" prettyCount toBlah "foos" (x,4) == "blah ×4 foos"