regex-0.2.0.4: Toolkit for regex-base

Safe HaskellNone
LanguageHaskell2010

Text.RE.Edit

Documentation

data Edits m re s Source #

Constructors

Select [(re, Edit m s)] 
Pipe [(re, Edit m s)] 

data Edit m s Source #

Constructors

EDIT_tpl s 
EDIT_phi (Phi s) 
EDIT_fun Context (LineNo -> Match s -> Location -> Capture s -> m (Maybe s)) 
EDIT_gen (LineNo -> Matches s -> m (LineEdit s)) 

data LineEdit s Source #

Constructors

NoEdit 
ReplaceWith s 
Delete 

Instances

Show s => Show (LineEdit s) Source # 

Methods

showsPrec :: Int -> LineEdit s -> ShowS #

show :: LineEdit s -> String #

showList :: [LineEdit s] -> ShowS #

applyEdits :: (IsRegex re s, Monad m, Functor m) => LineNo -> Edits m re s -> s -> m s Source #

applyEdit :: (IsRegex re s, Monad m, Functor m) => (s -> s) -> LineNo -> re -> Edit m s -> s -> m (Maybe s) Source #

applyLineEdit :: Monoid s => (s -> s) -> LineEdit s -> Maybe s Source #