{-# OPTIONS_GHC -fno-warn-partial-fields #-}
{-# OPTIONS_GHC -fno-warn-missing-export-lists #-}
module Data.Diff.Types where
import Data.Text
data Edit = EditDelete { Edit -> Int
deleteFrom :: Int
, Edit -> Int
deleteTo :: Int }
| EditInsert { Edit -> Int
insertPos :: Int
, Edit -> Int
insertFrom :: Int
, Edit -> Int
insertTo :: Int }
deriving (Int -> Edit -> ShowS
[Edit] -> ShowS
Edit -> String
(Int -> Edit -> ShowS)
-> (Edit -> String) -> ([Edit] -> ShowS) -> Show Edit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Edit -> ShowS
showsPrec :: Int -> Edit -> ShowS
$cshow :: Edit -> String
show :: Edit -> String
$cshowList :: [Edit] -> ShowS
showList :: [Edit] -> ShowS
Show, Edit -> Edit -> Bool
(Edit -> Edit -> Bool) -> (Edit -> Edit -> Bool) -> Eq Edit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Edit -> Edit -> Bool
== :: Edit -> Edit -> Bool
$c/= :: Edit -> Edit -> Bool
/= :: Edit -> Edit -> Bool
Eq)
data Position = Position { Position -> Int
positionLine :: Int
, Position -> Int
positionCh :: Int }
deriving (Int -> Position -> ShowS
[Position] -> ShowS
Position -> String
(Int -> Position -> ShowS)
-> (Position -> String) -> ([Position] -> ShowS) -> Show Position
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Position -> ShowS
showsPrec :: Int -> Position -> ShowS
$cshow :: Position -> String
show :: Position -> String
$cshowList :: [Position] -> ShowS
showList :: [Position] -> ShowS
Show, Position -> Position -> Bool
(Position -> Position -> Bool)
-> (Position -> Position -> Bool) -> Eq Position
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Position -> Position -> Bool
== :: Position -> Position -> Bool
$c/= :: Position -> Position -> Bool
/= :: Position -> Position -> Bool
Eq)
data Range = Range { Range -> Position
rangeStart :: Position
, Range -> Position
rangeEnd :: Position }
deriving (Int -> Range -> ShowS
[Range] -> ShowS
Range -> String
(Int -> Range -> ShowS)
-> (Range -> String) -> ([Range] -> ShowS) -> Show Range
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Range -> ShowS
showsPrec :: Int -> Range -> ShowS
$cshow :: Range -> String
show :: Range -> String
$cshowList :: [Range] -> ShowS
showList :: [Range] -> ShowS
Show, Range -> Range -> Bool
(Range -> Range -> Bool) -> (Range -> Range -> Bool) -> Eq Range
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Range -> Range -> Bool
== :: Range -> Range -> Bool
$c/= :: Range -> Range -> Bool
/= :: Range -> Range -> Bool
Eq)
data ChangeEvent = ChangeEvent { ChangeEvent -> Range
range :: Range
, ChangeEvent -> Text
text :: Text }
deriving (Int -> ChangeEvent -> ShowS
[ChangeEvent] -> ShowS
ChangeEvent -> String
(Int -> ChangeEvent -> ShowS)
-> (ChangeEvent -> String)
-> ([ChangeEvent] -> ShowS)
-> Show ChangeEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChangeEvent -> ShowS
showsPrec :: Int -> ChangeEvent -> ShowS
$cshow :: ChangeEvent -> String
show :: ChangeEvent -> String
$cshowList :: [ChangeEvent] -> ShowS
showList :: [ChangeEvent] -> ShowS
Show, ChangeEvent -> ChangeEvent -> Bool
(ChangeEvent -> ChangeEvent -> Bool)
-> (ChangeEvent -> ChangeEvent -> Bool) -> Eq ChangeEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChangeEvent -> ChangeEvent -> Bool
== :: ChangeEvent -> ChangeEvent -> Bool
$c/= :: ChangeEvent -> ChangeEvent -> Bool
/= :: ChangeEvent -> ChangeEvent -> Bool
Eq)