packages feed

ansi-wl-pprint 0.6.4 → 0.6.6

raw patch · 2 files changed

+12/−4 lines, 2 filesdep ~ansi-terminalPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: ansi-terminal

API changes (from Hackage documentation)

- Text.PrettyPrint.ANSI.Leijen: column, nesting :: (Int -> Doc) -> Doc
+ Text.PrettyPrint.ANSI.Leijen: column :: (Int -> Doc) -> Doc
+ Text.PrettyPrint.ANSI.Leijen: columns :: (Maybe Int -> Doc) -> Doc
+ Text.PrettyPrint.ANSI.Leijen: nesting :: (Int -> Doc) -> Doc

Files

Text/PrettyPrint/ANSI/Leijen.hs view
@@ -138,7 +138,7 @@    -- * Undocumented         , bool -        , column, nesting, width+        , column, columns, nesting, width          ) where @@ -736,6 +736,7 @@                 | Nest !Int Doc                 | Union Doc Doc         -- invariant: first lines of first doc longer than the first lines of the second doc                 | Column  (Int -> Doc)+                | Columns (Maybe Int -> Doc)                 | Nesting (Int -> Doc)                 | Color ConsoleLayer ColorIntensity -- Introduces coloring /around/ the embedded document                         Color Doc@@ -831,6 +832,9 @@ column f        = Column f nesting f       = Nesting f +columns :: (Maybe Int -> Doc) -> Doc+columns f       = Columns f+ -- | The @group@ combinator is used to specify alternative -- layouts. The document @(group x)@ undoes all line breaks in -- document @x@. The resulting line is added to the current line if@@ -845,6 +849,7 @@ flatten (Line break)     = if break then Empty else Text 1 " " flatten (Union x y)      = flatten x flatten (Column f)       = Column (flatten . f)+flatten (Columns f)      = Columns (flatten . f) flatten (Nesting f)      = Nesting (flatten . f) flatten (Color l i c x)  = Color l i c (flatten x) flatten (Intensify i x)  = Intensify i (flatten x)@@ -1024,6 +1029,7 @@ plain (Nest i x)      = Nest i (plain x) plain (Union x y)     = Union (plain x) (plain y) plain (Column f)      = Column (plain . f)+plain (Columns f)     = Columns (plain . f) plain (Nesting f)     = Nesting (plain . f) plain (Color _ _ _ x) = plain x plain (Intensify _ x) = plain x@@ -1081,6 +1087,7 @@             Union x y     -> nicest n k (best_typical n k (Cons i x ds))                                         (best_typical n k (Cons i y ds))             Column f      -> best_typical n k (Cons i (f k) ds)+            Columns f     -> best_typical n k (Cons i (f (Just w)) ds)             Nesting f     -> best_typical n k (Cons i (f i) ds)             Color l t c x -> SSGR [SetColor l t c] (best n k mb_fc' mb_bc' mb_in mb_it mb_un (Cons i x ds_restore))               where@@ -1149,6 +1156,7 @@                         Nest j x                -> scan k (x:ds)                         Union x y               -> scan k (y:ds)                         Column f                -> scan k (f k:ds)+                        Columns f               -> scan k (f Nothing:ds)                         Nesting f               -> scan k (f 0:ds)                         Color _ _ _ x           -> scan k (x:ds)                         Intensify _ x           -> scan k (x:ds)
ansi-wl-pprint.cabal view
@@ -1,5 +1,5 @@ Name:                ansi-wl-pprint-Version:             0.6.4+Version:             0.6.6 Cabal-Version:       >= 1.2 Category:            User Interfaces, Text Synopsis:            The Wadler/Leijen Pretty Printer for colored ANSI terminal output@@ -24,7 +24,7 @@ Library         Exposed-Modules:        Text.PrettyPrint.ANSI.Leijen         -        Build-Depends:          ansi-terminal >= 0.4.0 && < 0.6+        Build-Depends:          ansi-terminal >= 0.4.0 && < 0.7         if flag(newbase)                 Build-Depends:  base >= 3 && < 5         else@@ -33,7 +33,7 @@ Executable ansi-wl-pprint-example         Main-Is:                Text/PrettyPrint/ANSI/Example.hs         -        Build-Depends:          ansi-terminal >= 0.4.0 && < 0.6+        Build-Depends:          ansi-terminal >= 0.4.0 && < 0.7         if flag(newbase)                 Build-Depends:  base >= 3 && < 5         else