This file is indexed.

/usr/share/doc/libghc-regex-pcre-doc/html/regex-pcre.txt is in libghc-regex-pcre-doc 0.94.4-9build1.

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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Replaces/Enhances Text.Regex
--   
--   The PCRE backend to accompany regex-base, see www.pcre.org
@package regex-pcre
@version 0.94.4


-- | This will fail or error only if allocation fails or a nullPtr is
--   passed in.
module Text.Regex.PCRE.Wrap

-- | A compiled regular expression
data Regex
newtype CompOption
CompOption :: CInt -> CompOption
newtype ExecOption
ExecOption :: CInt -> ExecOption
(=~) :: (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target) => source1 -> source -> target
(=~~) :: (RegexMaker Regex CompOption ExecOption source, RegexContext Regex source1 target, Monad m) => source1 -> source -> m target
type StartOffset = MatchOffset
type EndOffset = MatchOffset
newtype ReturnCode
ReturnCode :: CInt -> ReturnCode
type WrapError = (ReturnCode, String)

-- | Compiles a regular expression
wrapCompile :: CompOption -> ExecOption -> CString -> IO (Either (MatchOffset, String) Regex)
wrapTest :: StartOffset -> Regex -> CStringLen -> IO (Either WrapError Bool)

-- | Matches a regular expression against a string
--   
--   Should never return (Right (Just []))
wrapMatch :: StartOffset -> Regex -> CStringLen -> IO (Either WrapError (Maybe [(StartOffset, EndOffset)]))

-- | wrapMatchAll is an improvement over wrapMatch since it only allocates
--   memory with allocaBytes once at the start.
wrapMatchAll :: Regex -> CStringLen -> IO (Either WrapError [MatchArray])
wrapCount :: Regex -> CStringLen -> IO (Either WrapError Int)

-- | return version of pcre used or Nothing if pcre is not available.
getVersion :: Maybe String
configUTF8 :: Bool
getNumSubs :: Regex -> Int
unusedOffset :: MatchOffset
compBlank :: CompOption
compAnchored :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compExtended :: CompOption
compExtra :: CompOption
compFirstLine :: CompOption
compMultiline :: CompOption
compNoAutoCapture :: CompOption
compUngreedy :: CompOption
compUTF8 :: CompOption
compNoUTF8Check :: CompOption
execBlank :: ExecOption
execAnchored :: ExecOption
execNotBOL :: ExecOption
execNotEOL :: ExecOption
execNotEmpty :: ExecOption
execNoUTF8Check :: ExecOption
execPartial :: ExecOption
retOk :: ReturnCode
retNoMatch :: ReturnCode
retNull :: ReturnCode
retBadOption :: ReturnCode
retBadMagic :: ReturnCode
retUnknownNode :: ReturnCode
retNoMemory :: ReturnCode
retNoSubstring :: ReturnCode
instance GHC.Show.Show Text.Regex.PCRE.Wrap.ConfigWhat
instance GHC.Classes.Eq Text.Regex.PCRE.Wrap.ConfigWhat
instance GHC.Show.Show Text.Regex.PCRE.Wrap.InfoWhat
instance GHC.Classes.Eq Text.Regex.PCRE.Wrap.InfoWhat
instance GHC.Show.Show Text.Regex.PCRE.Wrap.ReturnCode
instance GHC.Classes.Eq Text.Regex.PCRE.Wrap.ReturnCode
instance Data.Bits.Bits Text.Regex.PCRE.Wrap.ExecOption
instance GHC.Num.Num Text.Regex.PCRE.Wrap.ExecOption
instance GHC.Show.Show Text.Regex.PCRE.Wrap.ExecOption
instance GHC.Classes.Eq Text.Regex.PCRE.Wrap.ExecOption
instance Data.Bits.Bits Text.Regex.PCRE.Wrap.CompOption
instance GHC.Num.Num Text.Regex.PCRE.Wrap.CompOption
instance GHC.Show.Show Text.Regex.PCRE.Wrap.CompOption
instance GHC.Classes.Eq Text.Regex.PCRE.Wrap.CompOption
instance Text.Regex.Base.RegexLike.RegexOptions Text.Regex.PCRE.Wrap.Regex Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption


-- | This exports instances of the high level API and the medium level API
--   of <a>compile</a>,<a>execute</a>, and <a>regexec</a>.
module Text.Regex.PCRE.String

-- | A compiled regular expression
data Regex

-- | 0 based index from start of source, or (-1) for unused
type MatchOffset = Int

-- | non-negative length of a match
type MatchLength = Int
newtype CompOption
CompOption :: CInt -> CompOption
newtype ExecOption
ExecOption :: CInt -> ExecOption
data ReturnCode
type WrapError = (ReturnCode, String)
unusedOffset :: MatchOffset

-- | return version of pcre used or Nothing if pcre is not available.
getVersion :: Maybe String

-- | Compiles a regular expression
compile :: CompOption -> ExecOption -> String -> IO (Either (MatchOffset, String) Regex)

-- | Matches a regular expression against a string
execute :: Regex -> String -> IO (Either WrapError (Maybe (Array Int (MatchOffset, MatchLength))))

-- | execute match and extract substrings rather than just offsets
regexec :: Regex -> String -> IO (Either WrapError (Maybe (String, String, String, [String])))
compBlank :: CompOption
compAnchored :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compExtended :: CompOption
compExtra :: CompOption
compFirstLine :: CompOption
compMultiline :: CompOption
compNoAutoCapture :: CompOption
compUngreedy :: CompOption
compUTF8 :: CompOption
compNoUTF8Check :: CompOption
execBlank :: ExecOption
execAnchored :: ExecOption
execNotBOL :: ExecOption
execNotEOL :: ExecOption
execNotEmpty :: ExecOption
execNoUTF8Check :: ExecOption
execPartial :: ExecOption
instance Text.Regex.Base.RegexLike.RegexContext Text.Regex.PCRE.Wrap.Regex GHC.Base.String GHC.Base.String
instance Text.Regex.Base.RegexLike.RegexMaker Text.Regex.PCRE.Wrap.Regex Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption GHC.Base.String
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex GHC.Base.String


-- | This exports instances of the high level API and the medium level API
--   of <a>compile</a>,<a>execute</a>, and <a>regexec</a>.
module Text.Regex.PCRE.Sequence

-- | A compiled regular expression
data Regex

-- | 0 based index from start of source, or (-1) for unused
type MatchOffset = Int

-- | non-negative length of a match
type MatchLength = Int
newtype CompOption
CompOption :: CInt -> CompOption
newtype ExecOption
ExecOption :: CInt -> ExecOption
data ReturnCode
type WrapError = (ReturnCode, String)
unusedOffset :: MatchOffset

-- | return version of pcre used or Nothing if pcre is not available.
getVersion :: Maybe String

-- | Compiles a regular expression
compile :: CompOption -> ExecOption -> (Seq Char) -> IO (Either (MatchOffset, String) Regex)

-- | Matches a regular expression against a string
execute :: Regex -> (Seq Char) -> IO (Either WrapError (Maybe (Array Int (MatchOffset, MatchLength))))

-- | execute match and extract substrings rather than just offsets
regexec :: Regex -> (Seq Char) -> IO (Either WrapError (Maybe (Seq Char, Seq Char, Seq Char, [(Seq Char)])))
compBlank :: CompOption
compAnchored :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compExtended :: CompOption
compExtra :: CompOption
compFirstLine :: CompOption
compMultiline :: CompOption
compNoAutoCapture :: CompOption
compUngreedy :: CompOption
compUTF8 :: CompOption
compNoUTF8Check :: CompOption
execBlank :: ExecOption
execAnchored :: ExecOption
execNotBOL :: ExecOption
execNotEOL :: ExecOption
execNotEmpty :: ExecOption
execNoUTF8Check :: ExecOption
execPartial :: ExecOption
instance Text.Regex.Base.RegexLike.RegexContext Text.Regex.PCRE.Wrap.Regex (Data.Sequence.Seq GHC.Types.Char) (Data.Sequence.Seq GHC.Types.Char)
instance Text.Regex.Base.RegexLike.RegexMaker Text.Regex.PCRE.Wrap.Regex Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption (Data.Sequence.Seq GHC.Types.Char)
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex (Data.Sequence.Seq GHC.Types.Char)


-- | This exports instances of the high level API and the medium level API
--   of <a>compile</a>,<a>execute</a>, and <a>regexec</a>.
module Text.Regex.PCRE.ByteString

-- | A compiled regular expression
data Regex

-- | 0 based index from start of source, or (-1) for unused
type MatchOffset = Int

-- | non-negative length of a match
type MatchLength = Int
newtype CompOption
CompOption :: CInt -> CompOption
newtype ExecOption
ExecOption :: CInt -> ExecOption
data ReturnCode
type WrapError = (ReturnCode, String)
unusedOffset :: MatchOffset

-- | return version of pcre used or Nothing if pcre is not available.
getVersion :: Maybe String

-- | Compiles a regular expression
compile :: CompOption -> ExecOption -> ByteString -> IO (Either (MatchOffset, String) Regex)

-- | Matches a regular expression against a buffer, returning the buffer
--   indicies of the match, and any submatches
--   
--   | Matches a regular expression against a string
execute :: Regex -> ByteString -> IO (Either WrapError (Maybe (Array Int (MatchOffset, MatchLength))))
regexec :: Regex -> ByteString -> IO (Either WrapError (Maybe (ByteString, ByteString, ByteString, [ByteString])))
compBlank :: CompOption
compAnchored :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compExtended :: CompOption
compExtra :: CompOption
compFirstLine :: CompOption
compMultiline :: CompOption
compNoAutoCapture :: CompOption
compUngreedy :: CompOption
compUTF8 :: CompOption
compNoUTF8Check :: CompOption
execBlank :: ExecOption
execAnchored :: ExecOption
execNotBOL :: ExecOption
execNotEOL :: ExecOption
execNotEmpty :: ExecOption
execNoUTF8Check :: ExecOption
execPartial :: ExecOption
instance Text.Regex.Base.RegexLike.RegexContext Text.Regex.PCRE.Wrap.Regex Data.ByteString.Internal.ByteString Data.ByteString.Internal.ByteString
instance Text.Regex.Base.RegexLike.RegexMaker Text.Regex.PCRE.Wrap.Regex Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption Data.ByteString.Internal.ByteString
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex Data.ByteString.Internal.ByteString


-- | This exports instances of the high level API and the medium level API
--   of <a>compile</a>,<a>execute</a>, and <a>regexec</a>.
module Text.Regex.PCRE.ByteString.Lazy

-- | A compiled regular expression
data Regex

-- | 0 based index from start of source, or (-1) for unused
type MatchOffset = Int

-- | non-negative length of a match
type MatchLength = Int
newtype CompOption
CompOption :: CInt -> CompOption
newtype ExecOption
ExecOption :: CInt -> ExecOption
data ReturnCode
type WrapError = (ReturnCode, String)
unusedOffset :: MatchOffset

-- | return version of pcre used or Nothing if pcre is not available.
getVersion :: Maybe String

-- | Compiles a regular expression
compile :: CompOption -> ExecOption -> ByteString -> IO (Either (MatchOffset, String) Regex)

-- | Matches a regular expression against a buffer, returning the buffer
--   indicies of the match, and any submatches
--   
--   | Matches a regular expression against a string
execute :: Regex -> ByteString -> IO (Either WrapError (Maybe (Array Int (MatchOffset, MatchLength))))
regexec :: Regex -> ByteString -> IO (Either WrapError (Maybe (ByteString, ByteString, ByteString, [ByteString])))
compBlank :: CompOption
compAnchored :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compExtended :: CompOption
compExtra :: CompOption
compFirstLine :: CompOption
compMultiline :: CompOption
compNoAutoCapture :: CompOption
compUngreedy :: CompOption
compUTF8 :: CompOption
compNoUTF8Check :: CompOption
execBlank :: ExecOption
execAnchored :: ExecOption
execNotBOL :: ExecOption
execNotEOL :: ExecOption
execNotEmpty :: ExecOption
execNoUTF8Check :: ExecOption
execPartial :: ExecOption
instance Text.Regex.Base.RegexLike.RegexContext Text.Regex.PCRE.Wrap.Regex Data.ByteString.Lazy.Internal.ByteString Data.ByteString.Lazy.Internal.ByteString
instance Text.Regex.Base.RegexLike.RegexMaker Text.Regex.PCRE.Wrap.Regex Text.Regex.PCRE.Wrap.CompOption Text.Regex.PCRE.Wrap.ExecOption Data.ByteString.Lazy.Internal.ByteString
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE.Wrap.Regex Data.ByteString.Lazy.Internal.ByteString


-- | The <a>Text.Regex.PCRE</a> module provides a backend for regular
--   expressions. If you import this along with other backends, then you
--   should do so with qualified imports, perhaps renamed for convenience.
--   
--   You will need to have libpcre, from www.pcre.org, to use this module.
--   The haskell must be compiled with -DHAVE_PCRE_H and linked with pcre.
--   This is the default in the cabal file.
--   
--   If you do not compile with HAVE_PCRE_H then the functions will still
--   exist, but using them will create a run time error. You can test for
--   the existance of PCRE by checking <a>getVersion</a> which is
--   <a>Nothing</a> if not compiled with PCRE or <a>Just</a> <a>String</a>
--   if PCRE is present.
--   
--   Using the provided <a>CompOption</a> and <a>ExecOption</a> values and
--   if <a>configUTF8</a> is True, then you might be able to send UTF8
--   encoded ByteStrings to PCRE and get sensible results. This is
--   currently untested.
--   
--   The regular expression can be provided as a <tt>ByteString</tt>, but
--   it will be copied and a NUL byte appended to make a <tt>CString</tt>
--   unless such a byte is already present. Thus the regular expression
--   cannot contain an explicit NUL byte. The search string is passed as a
--   <tt>CStringLen</tt> and may contain NUL bytes and does not need to end
--   in a NUL byte. <tt>ByteString</tt>s are searched in place (via
--   unsafeUseAsCStringLen).
--   
--   A <a>String</a> will be converted into a <tt>CString</tt> or
--   <tt>CStringLen</tt> for processing. Doing this repeatedly will be very
--   inefficient.
--   
--   The <a>Text.Regex.PCRE.String</a>, <a>Text.Regex.PCRE.ByteString</a>,
--   and <a>Text.Regex.PCRE.Wrap</a> modules provides both the high level
--   interface exported by this module and medium- and low-level interfaces
--   that returns error using Either structures.
module Text.Regex.PCRE
getVersion_Text_Regex_PCRE :: Version