Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Generics.Diff.Render
Description
Synopsis
- renderDiffResult :: DiffResult a -> Builder
- renderDiffResultWith :: RenderOpts -> DiffResult a -> Builder
- printDiffResult :: DiffResult a -> IO ()
- printDiffResultWith :: RenderOpts -> DiffResult a -> IO ()
- data RenderOpts
- defaultRenderOpts :: RenderOpts
- indentSize :: RenderOpts -> Natural
- numberedLevels :: RenderOpts -> Bool
- renderDiffError :: DiffError a -> Builder
- renderDiffErrorWith :: RenderOpts -> DiffError a -> Builder
- renderDiffErrorNested :: DiffErrorNested xss -> Builder
- renderDiffErrorNestedWith :: RenderOpts -> DiffErrorNested xss -> Builder
- renderListDiffError :: ListDiffError xss -> Builder
- renderListDiffErrorWith :: RenderOpts -> ListDiffError xss -> Builder
Rendering
renderDiffResult :: DiffResult a -> Builder Source #
Render a DiffResult
using a lazy Builder
.
renderDiffResultWith :: RenderOpts -> DiffResult a -> Builder Source #
Render a DiffResult
using a lazy Builder
, using custom RenderOpts
.
Printing
printDiffResult :: DiffResult a -> IO () Source #
Print a DiffResult
to the terminal.
printDiffResultWith :: RenderOpts -> DiffResult a -> IO () Source #
Print a DiffResult
to the terminal, using custom RenderOpts
.
Options
data RenderOpts Source #
Configuration type used to tweak the output of renderDiffResultWith
.
Use defaultRenderOpts
and the field accessors below to construct.
Instances
Show RenderOpts Source # | |
Defined in Generics.Diff.Render Methods showsPrec :: Int -> RenderOpts -> ShowS # show :: RenderOpts -> String # showList :: [RenderOpts] -> ShowS # |
defaultRenderOpts :: RenderOpts Source #
Sensible rendering defaults. No numbers, 2-space indentation.
indentSize :: RenderOpts -> Natural Source #
How many spaces to indent each new "level" of comparison.
numberedLevels :: RenderOpts -> Bool Source #
Whether or not to include level numbers in the output.
Helper rendering functions
renderDiffErrorWith :: RenderOpts -> DiffError a -> Builder Source #
Render a DiffError
using a lazy Builder
, using custom RenderOpts
.
renderDiffErrorNested :: DiffErrorNested xss -> Builder Source #
Render a DiffErrorNested
using a lazy Builder
.
renderDiffErrorNestedWith :: RenderOpts -> DiffErrorNested xss -> Builder Source #
Render a DiffErrorNested
using a lazy Builder
, using custom RenderOpts
.
renderListDiffError :: ListDiffError xss -> Builder Source #
Render a ListDiffError
using a lazy Builder
.
renderListDiffErrorWith :: RenderOpts -> ListDiffError xss -> Builder Source #
Render a ListDiffError
using a lazy Builder
, using custom RenderOpts
.