yaml-marked-0.1.0.0: Support for parsing and rendering YAML documents with marks.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Yaml.Marked.Replace

Synopsis

Documentation

data Replace Source #

Instances

Instances details
Show Replace Source # 
Instance details

Defined in Data.Yaml.Marked.Replace

Eq Replace Source # 
Instance details

Defined in Data.Yaml.Marked.Replace

Methods

(==) :: Replace -> Replace -> Bool #

(/=) :: Replace -> Replace -> Bool #

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 #

Create a Replace for something Marked

runReplacesOnOverlapping Source #

Arguments

:: MonadThrow m 
=> (Replace -> m a)

What to do with the first overlapping Replace if encountered

NB. the overlapping replace(s) will be ignored, but this allows you to log it as a warning, or use throwM to halt (which runReplaces does).

-> [Replace] 
-> ByteString 
-> m ByteString