-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | PCRE2 Backend for "Text.Regex" (regex-base)
--   
--   This package provides a <a>PCRE2</a> backend for the <a>regex-base</a>
--   API.
@package regex-pcre2
@version 1.0.0.0


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

-- | A compiled regular expression
data Regex
newtype CompOption
CompOption :: Word32 -> CompOption
newtype MatchOption
MatchOption :: Word32 -> MatchOption
(=~) :: (RegexMaker Regex CompOption MatchOption source, RegexContext Regex source1 target) => source1 -> source -> target
(=~~) :: (RegexMaker Regex CompOption MatchOption source, RegexContext Regex source1 target, MonadFail 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 -> MatchOption -> CStringLen -> 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)

-- | Version string of PCRE2 library
getVersion :: Maybe String
getNumSubs :: Regex -> Int
unusedOffset :: MatchOffset
compBlank :: CompOption
compAnchored :: CompOption
compEndAnchored :: CompOption
compAllowEmptyClass :: CompOption
compAltBSUX :: CompOption
compAltExtendedClass :: CompOption
compAltVerbnames :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compDupNames :: CompOption
compExtended :: CompOption
compExtendedMore :: CompOption
compFirstLine :: CompOption
compLiteral :: CompOption
compMatchUnsetBackref :: CompOption
compMultiline :: CompOption
compNeverBackslashC :: CompOption
compNoAutoCapture :: CompOption
compNoAutoPossess :: CompOption
compNoDotstarAnchor :: CompOption
compNoUTFCheck :: CompOption
compUngreedy :: CompOption
compUTF :: CompOption
matchBlank :: MatchOption
matchAnchored :: MatchOption
matchCopyMatchedSubject :: MatchOption
matchDisableRecurseLoopCheck :: MatchOption
matchEndAnchored :: MatchOption
matchNotBOL :: MatchOption
matchNotEOL :: MatchOption
matchNotEmpty :: MatchOption
matchNotEmptyAtStart :: MatchOption
matchNoUTFCheck :: MatchOption
matchPartialHard :: MatchOption
matchPartialSoft :: MatchOption
retOk :: ReturnCode
retNoMatch :: ReturnCode
retPartial :: ReturnCode
retNull :: ReturnCode
retBadOption :: ReturnCode
retBadMagic :: ReturnCode
retNoMemory :: ReturnCode
retNoSubstring :: ReturnCode
instance GHC.Internal.Bits.Bits Text.Regex.PCRE2.Wrap.CompOption
instance GHC.Internal.Bits.Bits Text.Regex.PCRE2.Wrap.MatchOption
instance GHC.Classes.Eq Text.Regex.PCRE2.Wrap.CompOption
instance GHC.Classes.Eq Text.Regex.PCRE2.Wrap.ConfigWhat
instance GHC.Classes.Eq Text.Regex.PCRE2.Wrap.InfoWhat
instance GHC.Classes.Eq Text.Regex.PCRE2.Wrap.MatchOption
instance GHC.Classes.Eq Text.Regex.PCRE2.Wrap.ReturnCode
instance GHC.Internal.Num.Num Text.Regex.PCRE2.Wrap.CompOption
instance GHC.Internal.Num.Num Text.Regex.PCRE2.Wrap.MatchOption
instance Text.Regex.Base.RegexLike.RegexOptions Text.Regex.PCRE2.Wrap.Regex Text.Regex.PCRE2.Wrap.CompOption Text.Regex.PCRE2.Wrap.MatchOption
instance GHC.Internal.Show.Show Text.Regex.PCRE2.Wrap.CompOption
instance GHC.Internal.Show.Show Text.Regex.PCRE2.Wrap.ConfigWhat
instance GHC.Internal.Show.Show Text.Regex.PCRE2.Wrap.InfoWhat
instance GHC.Internal.Show.Show Text.Regex.PCRE2.Wrap.MatchOption
instance GHC.Internal.Show.Show Text.Regex.PCRE2.Wrap.ReturnCode


-- | 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.PCRE2.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 :: Word32 -> CompOption
newtype MatchOption
MatchOption :: Word32 -> MatchOption
data ReturnCode
type WrapError = (ReturnCode, String)
unusedOffset :: MatchOffset

-- | Version string of PCRE2 library
getVersion :: Maybe String

-- | Compiles a regular expression
compile :: CompOption -> MatchOption -> 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
compEndAnchored :: CompOption
compAllowEmptyClass :: CompOption
compAltBSUX :: CompOption
compAltExtendedClass :: CompOption
compAltVerbnames :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compDupNames :: CompOption
compExtended :: CompOption
compExtendedMore :: CompOption
compFirstLine :: CompOption
compLiteral :: CompOption
compMatchUnsetBackref :: CompOption
compMultiline :: CompOption
compNeverBackslashC :: CompOption
compNoAutoCapture :: CompOption
compNoAutoPossess :: CompOption
compNoDotstarAnchor :: CompOption
compNoUTFCheck :: CompOption
compUngreedy :: CompOption
compUTF :: CompOption
matchBlank :: MatchOption
matchAnchored :: MatchOption
matchCopyMatchedSubject :: MatchOption
matchDisableRecurseLoopCheck :: MatchOption
matchEndAnchored :: MatchOption
matchNotBOL :: MatchOption
matchNotEOL :: MatchOption
matchNotEmpty :: MatchOption
matchNotEmptyAtStart :: MatchOption
matchNoUTFCheck :: MatchOption
matchPartialHard :: MatchOption
matchPartialSoft :: MatchOption
instance Text.Regex.Base.RegexLike.RegexContext Text.Regex.PCRE2.Wrap.Regex GHC.Internal.Base.String GHC.Internal.Base.String
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE2.Wrap.Regex GHC.Internal.Base.String
instance Text.Regex.Base.RegexLike.RegexMaker Text.Regex.PCRE2.Wrap.Regex Text.Regex.PCRE2.Wrap.CompOption Text.Regex.PCRE2.Wrap.MatchOption GHC.Internal.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.PCRE2.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 :: Word32 -> CompOption
newtype MatchOption
MatchOption :: Word32 -> MatchOption
data ReturnCode
type WrapError = (ReturnCode, String)
unusedOffset :: MatchOffset

-- | Version string of PCRE2 library
getVersion :: Maybe String

-- | Compiles a regular expression
compile :: CompOption -> MatchOption -> 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
compEndAnchored :: CompOption
compAllowEmptyClass :: CompOption
compAltBSUX :: CompOption
compAltExtendedClass :: CompOption
compAltVerbnames :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compDupNames :: CompOption
compExtended :: CompOption
compExtendedMore :: CompOption
compFirstLine :: CompOption
compLiteral :: CompOption
compMatchUnsetBackref :: CompOption
compMultiline :: CompOption
compNeverBackslashC :: CompOption
compNoAutoCapture :: CompOption
compNoAutoPossess :: CompOption
compNoDotstarAnchor :: CompOption
compNoUTFCheck :: CompOption
compUngreedy :: CompOption
compUTF :: CompOption
matchBlank :: MatchOption
matchAnchored :: MatchOption
matchCopyMatchedSubject :: MatchOption
matchDisableRecurseLoopCheck :: MatchOption
matchEndAnchored :: MatchOption
matchNotBOL :: MatchOption
matchNotEOL :: MatchOption
matchNotEmpty :: MatchOption
matchNotEmptyAtStart :: MatchOption
matchNoUTFCheck :: MatchOption
matchPartialHard :: MatchOption
matchPartialSoft :: MatchOption
instance Text.Regex.Base.RegexLike.RegexContext Text.Regex.PCRE2.Wrap.Regex (Data.Sequence.Internal.Seq GHC.Types.Char) (Data.Sequence.Internal.Seq GHC.Types.Char)
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE2.Wrap.Regex (Data.Sequence.Internal.Seq GHC.Types.Char)
instance Text.Regex.Base.RegexLike.RegexMaker Text.Regex.PCRE2.Wrap.Regex Text.Regex.PCRE2.Wrap.CompOption Text.Regex.PCRE2.Wrap.MatchOption (Data.Sequence.Internal.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.PCRE2.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 :: Word32 -> CompOption
newtype MatchOption
MatchOption :: Word32 -> MatchOption
data ReturnCode
type WrapError = (ReturnCode, String)
unusedOffset :: MatchOffset

-- | Version string of PCRE2 library
getVersion :: Maybe String

-- | Compiles a regular expression
compile :: CompOption -> MatchOption -> 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
compEndAnchored :: CompOption
compAllowEmptyClass :: CompOption
compAltBSUX :: CompOption
compAltExtendedClass :: CompOption
compAltVerbnames :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compDupNames :: CompOption
compExtended :: CompOption
compExtendedMore :: CompOption
compFirstLine :: CompOption
compLiteral :: CompOption
compMatchUnsetBackref :: CompOption
compMultiline :: CompOption
compNeverBackslashC :: CompOption
compNoAutoCapture :: CompOption
compNoAutoPossess :: CompOption
compNoDotstarAnchor :: CompOption
compNoUTFCheck :: CompOption
compUngreedy :: CompOption
compUTF :: CompOption
matchBlank :: MatchOption
matchAnchored :: MatchOption
matchCopyMatchedSubject :: MatchOption
matchDisableRecurseLoopCheck :: MatchOption
matchEndAnchored :: MatchOption
matchNotBOL :: MatchOption
matchNotEOL :: MatchOption
matchNotEmpty :: MatchOption
matchNotEmptyAtStart :: MatchOption
matchNoUTFCheck :: MatchOption
matchPartialHard :: MatchOption
matchPartialSoft :: MatchOption
instance Text.Regex.Base.RegexLike.RegexContext Text.Regex.PCRE2.Wrap.Regex Data.ByteString.Internal.Type.ByteString Data.ByteString.Internal.Type.ByteString
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE2.Wrap.Regex Data.ByteString.Internal.Type.ByteString
instance Text.Regex.Base.RegexLike.RegexMaker Text.Regex.PCRE2.Wrap.Regex Text.Regex.PCRE2.Wrap.CompOption Text.Regex.PCRE2.Wrap.MatchOption Data.ByteString.Internal.Type.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.PCRE2.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 :: Word32 -> CompOption
newtype MatchOption
MatchOption :: Word32 -> MatchOption
data ReturnCode
type WrapError = (ReturnCode, String)
unusedOffset :: MatchOffset

-- | Version string of PCRE2 library
getVersion :: Maybe String

-- | Compiles a regular expression
compile :: CompOption -> MatchOption -> 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
compEndAnchored :: CompOption
compAllowEmptyClass :: CompOption
compAltBSUX :: CompOption
compAltExtendedClass :: CompOption
compAltVerbnames :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compDupNames :: CompOption
compExtended :: CompOption
compExtendedMore :: CompOption
compFirstLine :: CompOption
compLiteral :: CompOption
compMatchUnsetBackref :: CompOption
compMultiline :: CompOption
compNeverBackslashC :: CompOption
compNoAutoCapture :: CompOption
compNoAutoPossess :: CompOption
compNoDotstarAnchor :: CompOption
compNoUTFCheck :: CompOption
compUngreedy :: CompOption
compUTF :: CompOption
matchBlank :: MatchOption
matchAnchored :: MatchOption
matchCopyMatchedSubject :: MatchOption
matchDisableRecurseLoopCheck :: MatchOption
matchEndAnchored :: MatchOption
matchNotBOL :: MatchOption
matchNotEOL :: MatchOption
matchNotEmpty :: MatchOption
matchNotEmptyAtStart :: MatchOption
matchNoUTFCheck :: MatchOption
matchPartialHard :: MatchOption
matchPartialSoft :: MatchOption
instance Text.Regex.Base.RegexLike.RegexContext Text.Regex.PCRE2.Wrap.Regex Data.ByteString.Lazy.Internal.ByteString Data.ByteString.Lazy.Internal.ByteString
instance Text.Regex.Base.RegexLike.RegexLike Text.Regex.PCRE2.Wrap.Regex Data.ByteString.Lazy.Internal.ByteString
instance Text.Regex.Base.RegexLike.RegexMaker Text.Regex.PCRE2.Wrap.Regex Text.Regex.PCRE2.Wrap.CompOption Text.Regex.PCRE2.Wrap.MatchOption Data.ByteString.Lazy.Internal.ByteString


-- | The <a>Text.Regex.PCRE2</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.
--   
--   This library uses the newer libpcre2, which supports UTF8-encoded
--   strings by default.
--   
--   The regular expression can be provided as a <tt>ByteString</tt>. The
--   regular expression and search string are passed as
--   <tt>CStringLen</tt>s and may contain NUL bytes and do 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>CStringLen</tt> for
--   processing. Doing this repeatedly will be very inefficient.
--   
--   The <a>Text.Regex.PCRE2.String</a>,
--   <a>Text.Regex.PCRE2.ByteString</a>, and <a>Text.Regex.PCRE2.Wrap</a>
--   modules provide both the high-level interface exported by this module
--   and medium- and low-level interfaces that return errors using
--   <a>Either</a> structures.
module Text.Regex.PCRE2
getVersion_Text_Regex_PCRE2 :: Version

-- | A compiled regular expression
data Regex
newtype CompOption
CompOption :: Word32 -> CompOption
newtype MatchOption
MatchOption :: Word32 -> MatchOption
(=~) :: (RegexMaker Regex CompOption MatchOption source, RegexContext Regex source1 target) => source1 -> source -> target
(=~~) :: (RegexMaker Regex CompOption MatchOption source, RegexContext Regex source1 target, MonadFail m) => source1 -> source -> m target
unusedOffset :: MatchOffset
getNumSubs :: Regex -> Int

-- | Version string of PCRE2 library
getVersion :: Maybe String
compBlank :: CompOption
compAnchored :: CompOption
compEndAnchored :: CompOption
compAllowEmptyClass :: CompOption
compAltBSUX :: CompOption
compAltExtendedClass :: CompOption
compAltVerbnames :: CompOption
compAutoCallout :: CompOption
compCaseless :: CompOption
compDollarEndOnly :: CompOption
compDotAll :: CompOption
compDupNames :: CompOption
compExtended :: CompOption
compExtendedMore :: CompOption
compFirstLine :: CompOption
compLiteral :: CompOption
compMatchUnsetBackref :: CompOption
compMultiline :: CompOption
compNeverBackslashC :: CompOption
compNoAutoCapture :: CompOption
compNoAutoPossess :: CompOption
compNoDotstarAnchor :: CompOption
compNoUTFCheck :: CompOption
compUngreedy :: CompOption
compUTF :: CompOption
matchBlank :: MatchOption
matchAnchored :: MatchOption
matchCopyMatchedSubject :: MatchOption
matchDisableRecurseLoopCheck :: MatchOption
matchEndAnchored :: MatchOption
matchNotBOL :: MatchOption
matchNotEOL :: MatchOption
matchNotEmpty :: MatchOption
matchNotEmptyAtStart :: MatchOption
matchNoUTFCheck :: MatchOption
matchPartialHard :: MatchOption
matchPartialSoft :: MatchOption
