packages feed

GenericPretty 1.2.1 → 1.2.2

raw patch · 6 files changed

+12/−8 lines, 6 filesbinary-addedPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Text.PrettyPrint.GenericPretty: instance (GOut f, Constructor c) => GOut (M1 C c f)
- Text.PrettyPrint.GenericPretty: instance (GOut f, Datatype c) => GOut (M1 D c f)
- Text.PrettyPrint.GenericPretty: instance (GOut f, GOut g) => GOut (f :*: g)
- Text.PrettyPrint.GenericPretty: instance (GOut f, GOut g) => GOut (f :+: g)
- Text.PrettyPrint.GenericPretty: instance (GOut f, Selector c) => GOut (M1 S c f)
- Text.PrettyPrint.GenericPretty: instance (Out a, Out b) => Out (Either a b)
- Text.PrettyPrint.GenericPretty: instance (Out a, Out b) => Out (a, b)
- Text.PrettyPrint.GenericPretty: instance (Out a, Out b, Out c) => Out (a, b, c)
- Text.PrettyPrint.GenericPretty: instance (Out a, Out b, Out c, Out d) => Out (a, b, c, d)
- Text.PrettyPrint.GenericPretty: instance (Out a, Out b, Out c, Out d, Out e) => Out (a, b, c, d, e)
- Text.PrettyPrint.GenericPretty: instance (Out a, Out b, Out c, Out d, Out e, Out f) => Out (a, b, c, d, e, f)
- Text.PrettyPrint.GenericPretty: instance (Out a, Out b, Out c, Out d, Out e, Out f, Out g) => Out (a, b, c, d, e, f, g)
- Text.PrettyPrint.GenericPretty: instance GOut U1
- Text.PrettyPrint.GenericPretty: instance Out ()
- Text.PrettyPrint.GenericPretty: instance Out Bool
- Text.PrettyPrint.GenericPretty: instance Out Char
- Text.PrettyPrint.GenericPretty: instance Out Double
- Text.PrettyPrint.GenericPretty: instance Out Float
- Text.PrettyPrint.GenericPretty: instance Out Int
- Text.PrettyPrint.GenericPretty: instance Out Integer
- Text.PrettyPrint.GenericPretty: instance Out Rational
- Text.PrettyPrint.GenericPretty: instance Out a => Out (Maybe a)
- Text.PrettyPrint.GenericPretty: instance Out a => Out [a]
- Text.PrettyPrint.GenericPretty: instance Out f => GOut (K1 t f)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.GOut f, GHC.Generics.Constructor c) => Text.PrettyPrint.GenericPretty.GOut (GHC.Generics.M1 GHC.Generics.C c f)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.GOut f, GHC.Generics.Datatype c) => Text.PrettyPrint.GenericPretty.GOut (GHC.Generics.M1 GHC.Generics.D c f)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.GOut f, GHC.Generics.Selector c) => Text.PrettyPrint.GenericPretty.GOut (GHC.Generics.M1 GHC.Generics.S c f)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.GOut f, Text.PrettyPrint.GenericPretty.GOut g) => Text.PrettyPrint.GenericPretty.GOut (f GHC.Generics.:*: g)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.GOut f, Text.PrettyPrint.GenericPretty.GOut g) => Text.PrettyPrint.GenericPretty.GOut (f GHC.Generics.:+: g)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.Out a, Text.PrettyPrint.GenericPretty.Out b) => Text.PrettyPrint.GenericPretty.Out (Data.Either.Either a b)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.Out a, Text.PrettyPrint.GenericPretty.Out b) => Text.PrettyPrint.GenericPretty.Out (a, b)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.Out a, Text.PrettyPrint.GenericPretty.Out b, Text.PrettyPrint.GenericPretty.Out c) => Text.PrettyPrint.GenericPretty.Out (a, b, c)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.Out a, Text.PrettyPrint.GenericPretty.Out b, Text.PrettyPrint.GenericPretty.Out c, Text.PrettyPrint.GenericPretty.Out d) => Text.PrettyPrint.GenericPretty.Out (a, b, c, d)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.Out a, Text.PrettyPrint.GenericPretty.Out b, Text.PrettyPrint.GenericPretty.Out c, Text.PrettyPrint.GenericPretty.Out d, Text.PrettyPrint.GenericPretty.Out e) => Text.PrettyPrint.GenericPretty.Out (a, b, c, d, e)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.Out a, Text.PrettyPrint.GenericPretty.Out b, Text.PrettyPrint.GenericPretty.Out c, Text.PrettyPrint.GenericPretty.Out d, Text.PrettyPrint.GenericPretty.Out e, Text.PrettyPrint.GenericPretty.Out f) => Text.PrettyPrint.GenericPretty.Out (a, b, c, d, e, f)
+ Text.PrettyPrint.GenericPretty: instance (Text.PrettyPrint.GenericPretty.Out a, Text.PrettyPrint.GenericPretty.Out b, Text.PrettyPrint.GenericPretty.Out c, Text.PrettyPrint.GenericPretty.Out d, Text.PrettyPrint.GenericPretty.Out e, Text.PrettyPrint.GenericPretty.Out f, Text.PrettyPrint.GenericPretty.Out g) => Text.PrettyPrint.GenericPretty.Out (a, b, c, d, e, f, g)
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.GOut GHC.Generics.U1
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out ()
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out GHC.Integer.Type.Integer
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out GHC.Real.Rational
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out GHC.Types.Bool
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out GHC.Types.Char
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out GHC.Types.Double
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out GHC.Types.Float
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out GHC.Types.Int
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out a => Text.PrettyPrint.GenericPretty.Out (GHC.Base.Maybe a)
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out a => Text.PrettyPrint.GenericPretty.Out [a]
+ Text.PrettyPrint.GenericPretty: instance Text.PrettyPrint.GenericPretty.Out f => Text.PrettyPrint.GenericPretty.GOut (GHC.Generics.K1 t f)
- Text.PrettyPrint.GenericPretty: class Out a where docPrec n x = sep $ out1 (from x) Pref n False doc x = sep $ out1 (from x) Pref 0 False docList = docListWith doc
+ Text.PrettyPrint.GenericPretty: class Out a
- Text.PrettyPrint.GenericPretty: doc :: Out a => a -> Doc
+ Text.PrettyPrint.GenericPretty: doc :: (Out a, Generic a, GOut (Rep a)) => a -> Doc
- Text.PrettyPrint.GenericPretty: docPrec :: Out a => Int -> a -> Doc
+ Text.PrettyPrint.GenericPretty: docPrec :: (Out a, Generic a, GOut (Rep a)) => Int -> a -> Doc
- Text.PrettyPrint.GenericPretty: fullPP :: Out a => (TextDetails -> b -> b) -> b -> Style -> a -> b
+ Text.PrettyPrint.GenericPretty: fullPP :: (Out a) => (TextDetails -> b -> b) -> b -> Style -> a -> b
- Text.PrettyPrint.GenericPretty: pp :: Out a => a -> IO ()
+ Text.PrettyPrint.GenericPretty: pp :: (Out a) => a -> IO ()
- Text.PrettyPrint.GenericPretty: ppLen :: Out a => Int -> a -> IO ()
+ Text.PrettyPrint.GenericPretty: ppLen :: (Out a) => Int -> a -> IO ()
- Text.PrettyPrint.GenericPretty: ppStyle :: Out a => Style -> a -> IO ()
+ Text.PrettyPrint.GenericPretty: ppStyle :: (Out a) => Style -> a -> IO ()
- Text.PrettyPrint.GenericPretty: pretty :: Out a => a -> String
+ Text.PrettyPrint.GenericPretty: pretty :: (Out a) => a -> String
- Text.PrettyPrint.GenericPretty: prettyLen :: Out a => Int -> a -> String
+ Text.PrettyPrint.GenericPretty: prettyLen :: (Out a) => Int -> a -> String
- Text.PrettyPrint.GenericPretty: prettyStyle :: Out a => Style -> a -> String
+ Text.PrettyPrint.GenericPretty: prettyStyle :: (Out a) => Style -> a -> String

Files

GenericPretty.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version:             1.2.1+Version:             1.2.2  -- A short (one-line) description of the package. Synopsis:            A generic, derivable, haskell pretty printer.@@ -18,7 +18,7 @@   derivation of pretty printing functions on user defined data   types.   .-  The form of generics used is based on that introduced in the paper:+  The form of geenrics used is based on that introduced in the paper:   Magalhaes, Dijkstra, Jeuring, and Loh,   A Generic Deriving Mechanism for Haskell,   3'rd ACM Symposium on Haskell, pp. 37-48, September 2010,@@ -29,7 +29,7 @@   .   This package requires the use of the new GHC.Generics features   <http://www.haskell.org/haskellwiki/GHC.Generics>, present from GHC 7.2.-  Use of these features is indicated by the DeriveGeneric pragma+  Use of these features is indicated by the DeriveGeneric pragma.   or the flag -XDeriveGeneric.   .   Pretty printing produces values of type Text.PrettyPrint.Doc, using@@ -75,7 +75,7 @@  -- Extra files to be distributed with the package, such as examples or -- a README.-Extra-source-files: README TestSuite/SimpleTest.hs TestSuite/Tests.hs TestSuite/CustomTest.hs TestSuite/ZigZagTest.hs+Extra-source-files: README TestSuite\SimpleTest.hs TestSuite\Tests.hs TestSuite\CustomTest.hs TestSuite\ZigZagTest.hs  -- Constraint on the version of Cabal needed to build this package. Cabal-version:       >=1.6
README view
@@ -54,9 +54,9 @@ Otherwise, the steps are:   0. Make sure you have a version of ghc >= 7.4 installed and that you can       use the 'runhaskell' command from the command line.-  1. Download and unpack "GenericPretty-1.2.0.tar.gz"+  1. Download and unpack "GenericPretty-1.2.2.tar.gz"   2. Move to the correct directory:-      $ cd GenericPretty-1.2.0+      $ cd GenericPretty-1.2.2   3. Run the following haskell commands to install the library globally:       $ runhaskell Setup configure        $ runhaskell Setup build
+ TestSuite/SimpleTest view

binary file changed (absent → 1588616 bytes)

+ TestSuite/SimpleTest.hi view

binary file changed (absent → 2291 bytes)

+ TestSuite/SimpleTest.o view

binary file changed (absent → 22040 bytes)

Text/PrettyPrint/GenericPretty.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE TypeOperators, FlexibleInstances, FlexibleContexts, DefaultSignatures #-}+{-# LANGUAGE CPP #-}  {-|   GenericPretty is a Haskell library that supports automatic@@ -23,6 +24,11 @@                       outputIO, outputStr,                       ) where ++#if MIN_VERSION_base(4,11,0)+-- Avoid name clash with Prelude.<> exported by post-SMP versions of base.+import Prelude hiding ( (<>) )+#endif import Data.List import GHC.Generics import Data.Char@@ -292,7 +298,6 @@ -- | Customizable pretty printer  -- -- Takes a user defined 'Text.PrettyPrint.MyPretty.Style' as a parameter and uses 'outputStr' to obtain the result--- -- Equivalent to: -- -- > fullPP outputStr ""@@ -324,7 +329,6 @@ -- | Customizable pretty printer. --  -- Takes a user defined 'Text.PrettyPrint.MyPretty.Style' as a parameter and uses 'outputIO' to obtain the result--- -- Equivalent to: -- -- > fullPP outputIO (putChar '\n')