[commit: packages/pretty] master: Add appropriate Show, Eq and Generic instances (a7db5b5)
git at git.haskell.org
git at git.haskell.org
Fri Jan 23 22:49:32 UTC 2015
Repository : ssh://git@git.haskell.org/pretty
On branch : master
Link : http://git.haskell.org/packages/pretty.git/commitdiff/a7db5b5897be64d94d9a13e9f9df120e05ff8afa
>---------------------------------------------------------------
commit a7db5b5897be64d94d9a13e9f9df120e05ff8afa
Author: David Terei <code at davidterei.com>
Date: Thu Dec 25 01:54:14 2014 -0800
Add appropriate Show, Eq and Generic instances
>---------------------------------------------------------------
a7db5b5897be64d94d9a13e9f9df120e05ff8afa
src/Text/PrettyPrint/HughesPJ.hs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/Text/PrettyPrint/HughesPJ.hs b/src/Text/PrettyPrint/HughesPJ.hs
index 86c4b71..6f11a8d 100644
--- a/src/Text/PrettyPrint/HughesPJ.hs
+++ b/src/Text/PrettyPrint/HughesPJ.hs
@@ -231,6 +231,7 @@ data TextDetails = Chr {-# UNPACK #-} !Char -- ^ A single Char fragment
| PStr String -- ^ Used to represent a Fast String fragment
-- but now deprecated and identical to the
-- Str constructor.
+ deriving (Show, Eq, Generic)
-- Combining @Doc@ values
instance Monoid Doc where
@@ -838,6 +839,7 @@ data Style
, lineLength :: Int -- ^ Length of line, in chars
, ribbonsPerLine :: Float -- ^ Ratio of line length to ribbon length
}
+ deriving (Show, Eq, Generic)
-- | The default style (@mode=PageMode, lineLength=100, ribbonsPerLine=1.5@).
style :: Style
@@ -848,6 +850,7 @@ data Mode = PageMode -- ^ Normal
| ZigZagMode -- ^ With zig-zag cuts
| LeftMode -- ^ No indentation, infinitely long lines
| OneLineMode -- ^ All on one line
+ deriving (Show, Eq, Generic)
-- | Render the @Doc@ to a String using the default @Style at .
render :: Doc -> String
More information about the ghc-commits
mailing list