-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Easy replacement when using text-icu regexes. -- @package text-regex-replace @version 0.1.1.0 -- | This implements a common DSL for regular expression replacement text. -- This is represented with the Replace data type. It also -- implements the IsString interface, so if -- OverloadedStrings is on, you can use a raw string to build -- the replacement. module Data.Text.ICU.Replace -- | A Replace instance is a function from a regular expression -- match to a Builder. This naturally forms a Monoid, so -- they're easy to combine. -- -- Replace also implements IsString, so raw strings can be -- used to construct them. data Replace -- | Execute a regular expression on a Text and replace the first -- match. replace :: Regex -> Replace -> Text -> Text -- | Replace one regular expression match with the Replace. replace' :: Replace -> Match -> Text -- | Execute a regular expression on a Text and replace all matches. replaceAll :: Regex -> Replace -> Text -> Text -- | Replace all regular expression matches with the Replace. replaceAll' :: Replace -> [Match] -> Text -- | Create a Replace that inserts a regular expression group. rgroup :: Int -> Replace -- | Create a Replace that inserts static Text. rtext :: Text -> Replace -- | Create a Replace that inserts a static String. rstring :: String -> Replace -- | Create a Replace from a function that transforms a Match -- into a Builder. rfn :: (Match -> Builder) -> Replace -- | Create a Replace From a function that transforms a Match -- into a Text. rtfn :: (Match -> Text) -> Replace -- | Create a Replace that inserts a static Builder. rbuilder :: Builder -> Replace instance Monoid Replace instance IsString Replace