1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
\begin{code}
module Text.RE.ZeInternals.Types.SearchReplace
( SearchReplace(..)
) where
\end{code}
\begin{code}
-- | contains a compiled RE and replacement template
data SearchReplace re s =
SearchReplace
{ getSearch :: !re -- ^ the RE to match a string to replace
, getTemplate :: !s -- ^ the replacement template with ${cap}
-- used to identify a capture (by number or
-- name if one was given) and '$$' being
-- used to escape a single '$'
}
deriving (Show)
\end{code}
\begin{code}
instance Functor (SearchReplace re) where
fmap f (SearchReplace re x) = SearchReplace re (f x)
\end{code}
|