This file is indexed.

/usr/share/doc/libghc-pretty-show-doc/html/pretty-show.txt is in libghc-pretty-show-doc 1.6.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Tools for working with derived `Show` instances and generic
inspection of values.
--   
--   We provide a library and an executable for working with derived
--   <a>Show</a> instances. By using the library, we can parse derived
--   <a>Show</a> instances into a generic data structure. The <tt>ppsh</tt>
--   tool uses the library to produce human-readable versions of
--   <a>Show</a> instances, which can be quite handy for debugging Haskell
--   programs. We can also render complex generic values into an
--   interactive Html page, for easier examination.
@package pretty-show
@version 1.6.6


-- | Functions for human-readable derived <a>Show</a> instances.
module Text.Show.Pretty

-- | Generic Haskell values. <tt>NaN</tt> and <tt>Infinity</tt> are
--   represented as constructors. The <a>String</a> in the literals is the
--   text for the literals "as is".
--   
--   A chain of infix constructors means that they appeared in the input
--   string without parentheses, i.e
--   
--   <tt>1 :+: 2 :*: 3</tt> is represented with <tt>InfixCons 1
--   [(<a>:+:</a>,2),(<a>:*:</a>,3)]</tt>, whereas
--   
--   <tt>1 :+: (2 :*: 3)</tt> is represented with <tt>InfixCons 1
--   [(<a>:+:</a>,InfixCons 2 [(<a>:*:</a>,3)])]</tt>.
data Value

-- | Data constructor
Con :: Name -> [Value] -> Value

-- | Infix data constructor chain
InfixCons :: Value -> [(Name, Value)] -> Value

-- | Record value
Rec :: Name -> [(Name, Value)] -> Value

-- | Tuple
Tuple :: [Value] -> Value

-- | List
List :: [Value] -> Value

-- | Negated value
Neg :: Value -> Value

-- | Rational
Ratio :: Value -> Value -> Value

-- | Non-negative integer
Integer :: String -> Value

-- | Non-negative floating num.
Float :: String -> Value

-- | Character
Char :: String -> Value

-- | String
String :: String -> Value

-- | A name.
type Name = String

-- | Pretty print a generic value. Our intention is that the result is
--   equivalent to the <a>Show</a> instance for the original value, except
--   possibly easier to understand by a human.
valToStr :: Value -> String

-- | Pretty print a generic value. Our intention is that the result is
--   equivalent to the <a>Show</a> instance for the original value, except
--   possibly easier to understand by a human.
valToDoc :: Value -> Doc

-- | Make an Html page representing the given value.
valToHtmlPage :: HtmlOpts -> Value -> String
parseValue :: String -> Maybe Value
reify :: Show a => a -> Maybe Value

-- | Try to show a value, prettily. If we do not understand the value, then
--   we just use its standard <a>Show</a> instance.
ppDoc :: Show a => a -> Doc

-- | Convert a generic value into a pretty <a>String</a>, if possible.
ppShow :: Show a => a -> String

-- | Render a value in the <a>PrettyVal</a> class to a <a>Doc</a>. The
--   benefit of this function is that <a>PrettyVal</a> instances may be
--   derived automatically using generics.
dumpDoc :: PrettyVal a => a -> Doc

-- | Render a value in the <a>PrettyVal</a> class to a <a>String</a>. The
--   benefit of this function is that <a>PrettyVal</a> instances may be
--   derived automatically using generics.
dumpStr :: PrettyVal a => a -> String

-- | A class for types that may be reified into a value. Instances of this
--   class may be derived automatically, for datatypes that support
--   <tt>Generics</tt>.
class PrettyVal a where prettyVal = oneVal . gdump . from listValue = List . map prettyVal
prettyVal :: PrettyVal a => a -> Value

-- | Convert a value into an Html fragment.
valToHtml :: HtmlOpts -> Value -> Html

-- | Options on how to generate Html (more to come).
data HtmlOpts
HtmlOpts :: FilePath -> Int -> HtmlOpts

-- | Path for extra files. If empty, we look in directory <tt>style</tt>,
--   relative to document.
dataDir :: HtmlOpts -> FilePath

-- | Max. number of columns in wide lists.
wideListWidth :: HtmlOpts -> Int

-- | Default options.
defaultHtmlOpts :: HtmlOpts

-- | Wrap an Html fragment to make an Html page.
htmlPage :: HtmlOpts -> Html -> String
newtype Html
Html :: String -> Html
exportHtml :: Html -> String
getDataDir :: IO FilePath

-- | <i>Deprecated: Please use <a>valToDoc</a> instead. </i>
ppValue :: Value -> Doc