packages feed

annotated-wl-pprint 0.5.3 → 0.6.0

raw patch · 2 files changed

+18/−6 lines, 2 filesdep ~base

Dependency ranges changed: base

Files

Text/PrettyPrint/Annotated/Leijen.hs view
@@ -44,7 +44,7 @@   annotate, noAnnotate,    -- * Rendering-  SimpleDoc(..), renderPretty, renderCompact, displayDecorated, displayS, displayIO,+  SimpleDoc(..), renderPretty, renderCompact, displayDecorated, display, displayS, displayIO,   SpanList(..), displaySpans    -- * Undocumented@@ -54,11 +54,20 @@ ) where  import System.IO (Handle,hPutStr,hPutChar,stdout)+import Data.String +import Prelude ((.), ($), (/=), (<), (<=), (>), (>=), (-), (*), (+), (++),+                Bool(..), Char, Double, Float, Functor, Int, Integer, IO, Rational, Show, ShowS,+                id, error, flip, foldr1, fromIntegral, length, max, min, otherwise, repeat, replicate,+                return, round, seq, show, showChar, showString, showsPrec, span, zipWith)+ infixr 5 </>,<//>,<$>,<$$> infixr 6 <>,<+>  +instance IsString (Doc a) where+    fromString = text+ ----------------------------------------------------------- -- list, tupled and semiBraces pretty print a list of -- documents either horizontally or vertically aligned.@@ -170,12 +179,12 @@ -- inserts a @line@ and continues doing that for all documents in -- @xs@. ----- > fillSep xs  = foldr (\<\/\>) empty xs+-- > fillSep xs  = foldr (</>) empty xs fillSep :: [Doc a] -> Doc a fillSep         = fold (</>)  -- | The document @(hsep xs)@ concatenates all documents @xs@--- horizontally with @(\<+\>)@.+-- horizontally with ('<+>'). hsep :: [Doc a] -> Doc a hsep            = fold (<+>) @@ -798,9 +807,12 @@   -------------------------------------------------------------- Displayers:  displayS and displayIO+-- Displayers:  displayS and displayIO (and display) ----------------------------------------------------------- +-- | @(display simpleDoc)@ transforms the @simpleDoc@ to a 'String'.+display :: SimpleDoc a -> String+display = flip displayS ""  -- | @(displayS simpleDoc a)@ takes the output @simpleDoc a@ from a -- rendering function and transforms it to a 'ShowS' type (for use in
annotated-wl-pprint.cabal view
@@ -1,5 +1,5 @@ Name:                annotated-wl-pprint-Version:             0.5.3+Version:             0.6.0 Cabal-Version:       >= 1.6 Synopsis:            The Wadler/Leijen Pretty Printer, with annotation support Category:            Text@@ -17,7 +17,7 @@ Library         Build-Depends:       base < 5         Exposed-Modules:     Text.PrettyPrint.Annotated.Leijen-        Extensions:          DeriveFunctor, OverlappingInstances+        Extensions:          DeriveFunctor         Ghc-options:         -fwarn-incomplete-patterns Source-Repository head         type:        git