[commit: packages/pretty] master: add minimal pragma to pretty class (6883fda)
git at git.haskell.org
git at git.haskell.org
Fri Jan 23 22:49:26 UTC 2015
Repository : ssh://git@git.haskell.org/pretty
On branch : master
Link : http://git.haskell.org/packages/pretty.git/commitdiff/6883fdac42eefc0b93db1938449eed8fd057e6a4
>---------------------------------------------------------------
commit 6883fdac42eefc0b93db1938449eed8fd057e6a4
Author: David Terei <code at davidterei.com>
Date: Wed Dec 24 15:49:00 2014 -0800
add minimal pragma to pretty class
>---------------------------------------------------------------
6883fdac42eefc0b93db1938449eed8fd057e6a4
src/Text/PrettyPrint/HughesPJClass.hs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/Text/PrettyPrint/HughesPJClass.hs b/src/Text/PrettyPrint/HughesPJClass.hs
index ebf6ea2..298f447 100644
--- a/src/Text/PrettyPrint/HughesPJClass.hs
+++ b/src/Text/PrettyPrint/HughesPJClass.hs
@@ -54,6 +54,10 @@ class Pretty a where
pPrintList :: PrettyLevel -> [a] -> Doc
pPrintList l = brackets . fsep . punctuate comma . map (pPrintPrec l 0)
+#if __GLASGOW_HASKELL__ >= 708
+ {-# MINIMAL pPrintPrec | pPrint #-}
+#endif
+
-- | Pretty print a value with the 'prettyNormal' level.
prettyShow :: (Pretty a) => a -> String
prettyShow = render . pPrint
More information about the ghc-commits
mailing list