pretty 1.1.3.3 → 1.1.3.4
raw patch · 6 files changed
+26/−4 lines, 6 files
Files
- CHANGELOG.md +5/−0
- pretty.cabal +4/−2
- src/Text/PrettyPrint/Annotated/HughesPJ.hs +5/−1
- src/Text/PrettyPrint/HughesPJ.hs +1/−1
- tests/Test.hs +2/−0
- tests/UnitT32.hs +9/−0
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Pretty library change log +## 1.1.3.4 -- 3rd June, 2016++* Fix over-zeleaous use of strictness causing stack allocation, fixes part of+ issue #32 (by Neil Mitchell).+ ## 1.1.3.3 -- 29th February, 2016 * Improve documentation.
pretty.cabal view
@@ -1,5 +1,5 @@ name: pretty-version: 1.1.3.3+version: 1.1.3.4 synopsis: Pretty-printing library description: This package contains a pretty-printing library, a set of API's@@ -24,7 +24,7 @@ source-repository this type: git location: http://github.com/haskell/pretty.git- tag: 1.1.3.3+ tag: 1.1.3.4 source-repository head type: git@@ -62,6 +62,8 @@ UnitLargeDoc UnitPP1 UnitT3911+ UnitT32 extensions: CPP, BangPatterns, DeriveGeneric include-dirs: src/Text/PrettyPrint/Annotated+ ghc-options: -rtsopts -with-rtsopts=-K2M
src/Text/PrettyPrint/Annotated/HughesPJ.hs view
@@ -262,7 +262,11 @@ -- Combining @Doc@ values #if __GLASGOW_HASKELL__ >= 800 instance Semi.Semigroup (Doc a) where+#ifndef TESTING (<>) = (Text.PrettyPrint.Annotated.HughesPJ.<>)+#else+ (<>) = (PrettyTestVersion.<>)+#endif instance Monoid (Doc a) where mempty = empty@@ -691,7 +695,7 @@ | otherwise = beside (reduceDoc p) g2 q2 beside p@(Above{}) g q = let !d = reduceDoc p in beside d g q beside (NilAbove p) g q = nilAbove_ $! beside p g q-beside (TextBeside t p) g q = TextBeside t $! rest+beside (TextBeside t p) g q = TextBeside t rest where rest = case p of Empty -> nilBeside g q
src/Text/PrettyPrint/HughesPJ.hs view
@@ -299,7 +299,7 @@ -- -- * @'nest' k ('nest' k' x) = 'nest' (k+k') x@ ----- * @'nest' k (x '<>' y) = 'nest' k z '<>' 'nest' k y@+-- * @'nest' k (x '<>' y) = 'nest' k x '<>' 'nest' k y@ -- -- * @'nest' k (x '$$' y) = 'nest' k x '$$' 'nest' k y@ --
tests/Test.hs view
@@ -18,6 +18,7 @@ import UnitLargeDoc import UnitPP1 import UnitT3911+import UnitT32 import Control.Monad import Data.Char (isSpace)@@ -39,6 +40,7 @@ -- unit tests testPP1 testT3911+ testT32 testLargeDoc -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ tests/UnitT32.hs view
@@ -0,0 +1,9 @@+-- Test from https://github.com/haskell/pretty/issues/32#issuecomment-223073337+module UnitT32 where++import Text.PrettyPrint.HughesPJ++import TestUtils++testT32 :: IO ()+testT32 = simpleMatch "T3911" (replicate 10 'x') $ take 10 $ render $ hcat $ repeat $ text "x"