2323-- This module will fail or error only if allocation fails or a nullPtr
2424-- is passed in.
2525--
26- -- 2009-January : wrapMatchAll and wrapCount now adjust the execution
27- -- option execNotBOL after the first result to take into account '\n'
26+ -- 2009-January : ' wrapMatchAll' and ' wrapCount' now adjust the execution
27+ -- option ' execNotBOL' after the first result to take into account '\n'
2828-- in the text immediately before the next matches. (version 0.93.3)
2929--
30- -- 2009-January : wrapMatchAll and wrapCount have been changed to
30+ -- 2009-January : ' wrapMatchAll' and ' wrapCount' have been changed to
3131-- return all non-overlapping matches, including empty matches even if
3232-- they coincide with the end of the previous non-empty match. The
3333-- change is that the first non-empty match no longer terminates the
@@ -125,17 +125,17 @@ try = Control.Exception.try
125125
126126data CRegex -- pointer tag for regex_t C type
127127
128- -- | RegOffset is " typedef int regoff_t" on Linux and ultimately " typedef
129- -- long long __int64_t" on Max OS X. So rather than saying
128+ -- | ' RegOffset' is @ typedef int regoff_t@ on Linux and ultimately @ typedef
129+ -- long long __int64_t@ on Max OS X. So rather than saying
130130-- 2,147,483,647 is all the length you need, I'll take the larger:
131131-- 9,223,372,036,854,775,807 should be enough bytes for anyone, no
132132-- need for Integer. The alternative is to compile to different sizes
133- -- in a platform dependent manner with " type RegOffset = (#type
134- -- regoff_t)" , which I do not want to do.
133+ -- in a platform dependent manner with @ type RegOffset = (#type
134+ -- regoff_t)@ , which I do not want to do.
135135--
136- -- There is also a special value 'unusedRegOffset' :: 'RegOffset' which is
136+ -- There is also a special value @ 'unusedRegOffset' :: 'RegOffset'@ which is
137137-- (-1) and as a starting index means that the subgroup capture was
138- -- unused. Otherwise the RegOffset indicates a character boundary that
138+ -- unused. Otherwise the ' RegOffset' indicates a character boundary that
139139-- is before the character at that index offset, with the first
140140-- character at index offset 0. So starting at 1 and ending at 2 means
141141-- to take only the second character.
@@ -170,7 +170,7 @@ newtype CompOption = CompOption CInt deriving (Eq,Show,Num,Bits)
170170-- regular expressions. Option values (and their man 3 regexec names) are
171171--
172172-- * 'execBlank' which is a complete zero value for all the flags. This is
173- -- the blankExecOpt value.
173+ -- the @ blankExecOpt@ value.
174174--
175175-- * 'execNotBOL' (REG_NOTBOL) can be set to prevent ^ from matching at the
176176-- start of the input.
@@ -226,7 +226,7 @@ execBlank = ExecOption 0
226226unusedRegOffset :: RegOffset
227227unusedRegOffset = (- 1 )
228228
229- -- | The return code will be retOk when it is the Haskell wrapper and
229+ -- | The return code will be @ retOk@ when it is the Haskell wrapper and
230230-- not the underlying library generating the error message.
231231type WrapError = (ReturnCode ,String )
232232
@@ -238,13 +238,13 @@ wrapCompile :: CompOption -- ^ Flags (bitmapped)
238238wrapTest :: Regex -> CString
239239 -> IO (Either WrapError Bool )
240240
241- -- | wrapMatch returns offsets for the begin and end of each capture.
242- -- Unused captures have offsets of unusedRegOffset which is (-1)
241+ -- | ' wrapMatch' returns offsets for the begin and end of each capture.
242+ -- Unused captures have offsets of ' unusedRegOffset' which is (-1).
243243wrapMatch :: Regex -> CString
244244 -> IO (Either WrapError (Maybe [(RegOffset ,RegOffset )]))
245245
246- -- | wrapMatchAll returns the offset and length of each capture.
247- -- Unused captures have an offset of unusedRegOffset which is (-1) and
246+ -- | ' wrapMatchAll' returns the offset and length of each capture.
247+ -- Unused captures have an offset of ' unusedRegOffset' which is (-1) and
248248-- length of 0.
249249wrapMatchAll :: Regex -> CString
250250 -> IO (Either WrapError [MatchArray ])
0 commit comments