edits-0.1.1.0: show the differences between 2 pieces of Text using the Levenshtein distance
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Text.EditOperation

Description

Data type describing the operation of editing some text

Synopsis

Documentation

data EditOperation a Source #

Atomic operation required to edit a piece of text at a given position in the EditMatrix

Constructors

Insert a 
Delete a 
Substitute a a 
Keep a 

Instances

Instances details
Show a => Show (EditOperation a) Source # 
Instance details

Defined in Data.Text.EditOperation

Eq a => Eq (EditOperation a) Source # 
Instance details

Defined in Data.Text.EditOperation

inverse :: EditOperation a -> EditOperation a Source #

Inverse of an edit operation. It is used to display not only how to go from text1 to text2 but also from text2 to text1