Module

Suggest

#Replacement

type Replacement = { filename :: String, original :: String, position :: Position, replacement :: String }

#Suggestions

type Suggestions = { files :: Ref (Map String (Array String)), replacements :: Array (Array Replacement) }

#applySuggestions

#replaceFile'

replaceFile' :: Int -> Int -> List String -> List Replacement -> Either String (List String)

This is where all the real work happens. Steps through the source file, outputting replacement text when the position matches otherwise the original text. Objects if replacements overlap or go past the file end.

#withNewlines

Modules