-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Pretty printing a diff of two values. -- -- Please see the README at -- https://github.com/stoeffel/pretty-diff. @package pretty-diff @version 0.2.0.2 -- | Printing nice and simple diffs of two values. -- --
-- import qualified Pretty.Diff as Diff -- import Data.Default (def) -- -- Diff.pretty def "1234" "_23" ---- -- Will create a string that looks like this: -- --
-- ▼ ▼ -- "1234" -- ╷ -- │ -- ╵ -- "_23" -- ▲ --module Pretty.Diff -- | Configuration for pretty. data Config Config :: Maybe Text -> Wrapping -> Config -- | Text that gets displayed inbetween the diffed values -- --
-- Diff.pretty def { Diff.separatorText = "differing" } "1234" "_23"
--
--
-- Will create a string that looks like this:
--
-- -- ▼ ▼ -- "1234" -- ╷ -- │ differing -- ╵ -- "_23" -- ▲ --[separatorText] :: Config -> Maybe Text -- | Wrapping text to multiple lines if they are longer than the provided -- length. This is useful in combination with terminal-size. -- --
-- Diff.pretty def { Diff.wrapping = Diff.Wrap 6 } "0900000000" "9000000000"
--
--
-- Will create a string that looks like this:
--
-- -- ▼ -- "09000 -- 00000" -- ╷ -- │ -- ╵ -- "90000 -- 00000" -- ▲ --[wrapping] :: Config -> Wrapping -- | Define whether or not to wrap the diffing lines. data Wrapping Wrap :: Int -> Wrapping NoWrap :: Wrapping -- | Printing a full diff of both values separated by some pipes. pretty :: Show a => Config -> a -> a -> Text -- | Printing The first value and the diff indicator above. -- --
-- Diff.above Diff.NoWrap "1234" "_23" -- ---- --
-- ▼ ▼ -- "1234" -- --above :: Show a => Wrapping -> a -> a -> Text -- | Printing The second value and the diff indicator below. -- --
-- Diff.below Diff.NoWrap "1234" "_23" -- ---- --
-- "_23" -- ▲ -- --below :: Show a => Wrapping -> a -> a -> Text instance Data.Default.Class.Default Pretty.Diff.Config