regex-0.6.0.0: Toolkit for regex-base

Safe HaskellNone
LanguageHaskell2010

Text.RE.Internal.AddCaptureNames

Synopsis

Documentation

addCaptureNamesToMatches :: CaptureNames -> Matches a -> Matches a Source #

a convenience function used by the API modules to insert capture names extracted from the parsed RE into the (*=~) result

addCaptureNamesToMatch :: CaptureNames -> Match a -> Match a Source #

a convenience function used by the API modules to insert capture names extracted from the parsed RE into the (?=~) result

addCaptureNames :: Typeable a => CaptureNames -> a -> a Source #

a hairy dynamically-typed function used with the legacy (=~) and (=~~) to see if it can/should add the capture names extracted from the RE into the polymorphic result of the operator (it does for any Match or Matches type, provided it is parameterised over a recognised type). The test suite is all over this one, testing all of these cases.