nix-diff-1.0.21: Explain why two Nix derivations differ
Safe HaskellSafe-Inferred
LanguageGHC2021

Nix.Diff.Render.HumanReadable

Synopsis

Documentation

newtype Render a Source #

Constructors

Render 

Instances

Instances details
Applicative Render Source # 
Instance details

Defined in Nix.Diff.Render.HumanReadable

Methods

pure :: a -> Render a #

(<*>) :: Render (a -> b) -> Render a -> Render b #

liftA2 :: (a -> b -> c) -> Render a -> Render b -> Render c #

(*>) :: Render a -> Render b -> Render b #

(<*) :: Render a -> Render b -> Render a #

Functor Render Source # 
Instance details

Defined in Nix.Diff.Render.HumanReadable

Methods

fmap :: (a -> b) -> Render a -> Render b #

(<$) :: a -> Render b -> Render a #

Monad Render Source # 
Instance details

Defined in Nix.Diff.Render.HumanReadable

Methods

(>>=) :: Render a -> (a -> Render b) -> Render b #

(>>) :: Render a -> Render b -> Render b #

return :: a -> Render a #

MonadReader RenderContext Render Source # 
Instance details

Defined in Nix.Diff.Render.HumanReadable

MonadWriter Text Render Source # 
Instance details

Defined in Nix.Diff.Render.HumanReadable

Methods

writer :: (a, Text) -> Render a #

tell :: Text -> Render () #

listen :: Render a -> Render (a, Text) #

pass :: Render (a, Text -> Text) -> Render a #

data TTY Source #

Constructors

IsTTY 
NotTTY 

escape Source #

Arguments

:: Text

Beginning of escape sequence

-> Text

Text to escape

-> Text 

This exists to improve compatibility with less -R. See:

https://github.com/Gabriella439/nix-diff/issues/95

red :: TTY -> Text -> Text Source #

Color text red

redBackground :: Orientation -> TTY -> Text -> Text Source #

Color text background red

green :: TTY -> Text -> Text Source #

Color text green

greenBackground :: Orientation -> TTY -> Text -> Text Source #

Color text background green

grey :: Orientation -> TTY -> Text -> Text Source #

Color text grey

minus :: TTY -> Text -> Text Source #

Format the left half of a diff

plus :: TTY -> Text -> Text Source #

Format the right half of a diff

explain :: Text -> Text Source #

Format text explaining a diff

renderWith :: Changed a -> ((Text -> Text, a) -> Render ()) -> Render () Source #

Utility to automate a common pattern of printing the two halves of a diff. This passes the correct formatting function to each half

renderOutputs :: OutputNames -> Text Source #

Format the derivation outputs

zippers :: [a] -> [([a], a, [a])] Source #