Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Replace
- newReplace :: Natural -> Natural -> ByteString -> Replace
- replaceMarked :: Marked a -> ByteString -> Replace
- data ReplaceException
- runReplaces :: MonadThrow m => [Replace] -> ByteString -> m ByteString
- runReplacesOnOverlapping :: MonadThrow m => (Replace -> m a) -> [Replace] -> ByteString -> m ByteString
Documentation
newReplace :: Natural -> Natural -> ByteString -> Replace Source #
Create a Replace
directly at given index and length
NB. This function is unsafe in that it can be used with negative literals and
will fail at runtime. Prefer replaceMarked
.
replaceMarked :: Marked a -> ByteString -> Replace Source #
data ReplaceException Source #
Instances
Exception ReplaceException Source # | |
Defined in Data.Yaml.Marked.Replace | |
Show ReplaceException Source # | |
Defined in Data.Yaml.Marked.Replace showsPrec :: Int -> ReplaceException -> ShowS # show :: ReplaceException -> String # showList :: [ReplaceException] -> ShowS # | |
Eq ReplaceException Source # | |
Defined in Data.Yaml.Marked.Replace (==) :: ReplaceException -> ReplaceException -> Bool # (/=) :: ReplaceException -> ReplaceException -> Bool # |
runReplaces :: MonadThrow m => [Replace] -> ByteString -> m ByteString Source #
runReplacesOnOverlapping Source #
:: MonadThrow m | |
=> (Replace -> m a) | What to do with the first overlapping NB. the overlapping replace(s) will be ignored, but this allows you to log
it as a warning, or use |
-> [Replace] | |
-> ByteString | |
-> m ByteString |