regex-0.6.0.0: 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

Template s 
Function Context (LineNo -> Match s -> Location -> Capture s -> m (Maybe s)) 
LineEdit (LineNo -> Matches s -> m (LineEdit s)) 

data LineEdit s Source

Constructors

NoEdit 
ReplaceWith s 
Delete 

Instances

Show s => Show (LineEdit s) 

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