2016-01-14 21:18:40 +03:00
|
|
|
module Renderer where
|
|
|
|
|
2016-05-26 19:58:04 +03:00
|
|
|
import Prologue
|
2016-02-29 05:29:59 +03:00
|
|
|
import Data.Functor.Both
|
2016-01-14 21:18:40 +03:00
|
|
|
import Diff
|
|
|
|
import Source
|
|
|
|
|
|
|
|
-- | A function that will render a diff, given the two source files.
|
2016-07-14 23:36:47 +03:00
|
|
|
type Renderer annotation = Diff Text annotation -> Both SourceBlob -> Text
|
2016-04-01 22:34:52 +03:00
|
|
|
|
|
|
|
data DiffArguments = DiffArguments { format :: Format, output :: Maybe FilePath, outputPath :: FilePath }
|
2016-04-12 20:10:24 +03:00
|
|
|
deriving (Show)
|
2016-04-01 22:34:52 +03:00
|
|
|
|
|
|
|
-- | The available types of diff rendering.
|
2016-05-18 19:01:16 +03:00
|
|
|
data Format = Split | Patch | JSON | Summary
|
2016-04-12 20:10:24 +03:00
|
|
|
deriving (Show)
|