ansi-wl-pprint 0.1 → 0.2
raw patch · 2 files changed
+19/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Text/PrettyPrint/ANSI/Leijen.hs +15/−0
- ansi-wl-pprint.cabal +4/−1
Text/PrettyPrint/ANSI/Leijen.hs view
@@ -818,6 +818,9 @@ cyan = Color Foreground Cyan white = Color Foreground White +-- | Displays a document with a forecolor given in the first parameter+color :: ANSIColor -> Doc -> Doc+color = Color Foreground -- | Displays a document with the given backcolor blackb, redb, greenb, yellowb, blueb, magentab, cyanb, whiteb :: Doc -> Doc@@ -830,7 +833,11 @@ cyanb = Color Background Cyan whiteb = Color Background White +-- | Displays a document with a backcolor given in the first parameter+colorb :: ANSIColor -> Doc -> Doc+colorb = Color Background + ----------------------------------------------------------- -- Renderers -----------------------------------------------------------@@ -943,6 +950,8 @@ -- -- > showWidth :: Int -> Doc -> String -- > showWidth w x = displayS (renderPretty 0.4 w x) ""+--+-- Color information is discarded by this function. displayS :: SimpleDoc -> ShowS displayS SEmpty = id displayS (SChar c x) = showChar c . displayS x@@ -955,6 +964,9 @@ -- handle @handle@. This function is used for example by 'hPutDoc': -- -- > hPutDoc handle doc = displayIO handle (renderPretty 0.4 100 doc)+--+-- Due to technical limitations, colorisation is not performed by this+-- function even if the handle is that of an ANSI console output stream. displayIO :: Handle -> SimpleDoc -> IO () displayIO handle simpleDoc = displayIO' (Just handle) simpleDoc @@ -1007,6 +1019,9 @@ -- > ["vertical","text"])) -- > ; hClose handle -- > }+--+-- Due to technical limitations, colorisation is not performed by this+-- function even if the handle is that of an ANSI console output stream. hPutDoc :: Handle -> Doc -> IO () hPutDoc handle doc = hPutDoc' (Just handle) doc
ansi-wl-pprint.cabal view
@@ -1,5 +1,5 @@ Name: ansi-wl-pprint-Version: 0.1+Version: 0.2 Cabal-Version: >= 1.2 Category: User Interfaces Synopsis: The Wadler/Leijen Pretty Printer for colored ANSI terminal output@@ -37,3 +37,6 @@ Build-Depends: base >= 3 else Build-Depends: base < 3+ + if !flag(example)+ Buildable: False