Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-prettyprinter for openSUSE:Factory checked in at 2021-09-20 23:33:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-prettyprinter (Old) and /work/SRC/openSUSE:Factory/.ghc-prettyprinter.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-prettyprinter" Mon Sep 20 23:33:39 2021 rev:5 rq:920334 version:1.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-prettyprinter/ghc-prettyprinter.changes 2020-12-22 11:44:39.901775821 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-prettyprinter.new.1899/ghc-prettyprinter.changes 2021-09-20 23:36:27.403418450 +0200 @@ -1,0 +2,17 @@ +Mon Sep 13 08:27:44 UTC 2021 - psim...@suse.com + +- Update prettyprinter to version 1.7.1. + # [1.7.1] + + - [Deprecate the `Data.Text.Prettyprint.*` modules](https://github.com/quchen/prettyprinter/pull/203) + * Users should migrate to the new `Prettyprinter` module hierarchy. + * The old modules will be removed no sooner than September 2022. + - [Make `text` an optional dependency:](https://github.com/quchen/prettyprinter/pull/202) + * When built with `-f-text`, any `text`-based APIs will operate on `String`s instead. + - Documentation improvements: + * [#194](https://github.com/quchen/prettyprinter/pull/194) + * [`1f0bffe`](https://github.com/quchen/prettyprinter/commit/1f0bffe5eb53874d1ba46b0a80bda67c02365f1b) + + [1.7.1]: https://github.com/quchen/prettyprinter/compare/v1.7.0...v1.7.1 + +------------------------------------------------------------------- Old: ---- prettyprinter-1.7.0.tar.gz New: ---- prettyprinter-1.7.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-prettyprinter.spec ++++++ --- /var/tmp/diff_new_pack.0dtLEI/_old 2021-09-20 23:36:27.795418935 +0200 +++ /var/tmp/diff_new_pack.0dtLEI/_new 2021-09-20 23:36:27.807418949 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-prettyprinter # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %global pkg_name prettyprinter %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.7.0 +Version: 1.7.1 Release: 0 Summary: A modern, easy to use, well-documented, extensible pretty-printer License: BSD-2-Clause ++++++ prettyprinter-1.7.0.tar.gz -> prettyprinter-1.7.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/CHANGELOG.md new/prettyprinter-1.7.1/CHANGELOG.md --- old/prettyprinter-1.7.0/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,16 @@ +# [1.7.1] + +- [Deprecate the `Data.Text.Prettyprint.*` modules](https://github.com/quchen/prettyprinter/pull/203) + * Users should migrate to the new `Prettyprinter` module hierarchy. + * The old modules will be removed no sooner than September 2022. +- [Make `text` an optional dependency:](https://github.com/quchen/prettyprinter/pull/202) + * When built with `-f-text`, any `text`-based APIs will operate on `String`s instead. +- Documentation improvements: + * [#194](https://github.com/quchen/prettyprinter/pull/194) + * [`1f0bffe`](https://github.com/quchen/prettyprinter/commit/1f0bffe5eb53874d1ba46b0a80bda67c02365f1b) + +[1.7.1]: https://github.com/quchen/prettyprinter/compare/v1.7.0...v1.7.1 + # [1.7.0] ## Breaking changes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/README.md new/prettyprinter-1.7.1/README.md --- old/prettyprinter-1.7.0/README.md 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/README.md 2001-09-09 03:46:40.000000000 +0200 @@ -5,12 +5,7 @@ A modern Wadler/Leijen Prettyprinter ==================================== -[![](https://img.shields.io/travis/quchen/prettyprinter/master.svg?style=flat-square&label=Master%20build)](https://travis-ci.org/quchen/prettyprinter) [![](https://img.shields.io/hackage/v/prettyprinter.svg?style=flat-square&label=Hackage&colorB=0a7bbb)](https://hackage.haskell.org/package/prettyprinter) -[![](https://www.stackage.org/package/prettyprinter/badge/lts?style=flat-square&colorB=0a7bbb)](https://www.stackage.org/package/prettyprinter) -[![](https://www.stackage.org/package/prettyprinter/badge/nightly?style=flat-square&label=stackage%20nightly&colorB=0a7bbb)](https://www.stackage.org/package/prettyprinter) - - tl;dr ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/app/GenerateReadme.hs new/prettyprinter-1.7.1/app/GenerateReadme.hs --- old/prettyprinter-1.7.0/app/GenerateReadme.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/app/GenerateReadme.hs 2001-09-09 03:46:40.000000000 +0200 @@ -11,8 +11,8 @@ import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as T -import Data.Text.Prettyprint.Doc -import Data.Text.Prettyprint.Doc.Render.Text +import Prettyprinter +import Prettyprinter.Render.Text import MultilineTh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/bench/FasterUnsafeText.hs new/prettyprinter-1.7.1/bench/FasterUnsafeText.hs --- old/prettyprinter-1.7.0/bench/FasterUnsafeText.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/bench/FasterUnsafeText.hs 2001-09-09 03:46:40.000000000 +0200 @@ -6,9 +6,9 @@ import Gauge.Main import Data.Char -import Data.Text (Text) -import qualified Data.Text as T -import Data.Text.Prettyprint.Doc.Internal +import Data.Text (Text) +import qualified Data.Text as T +import Prettyprinter.Internal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/bench/Fusion.hs new/prettyprinter-1.7.1/bench/Fusion.hs --- old/prettyprinter-1.7.0/bench/Fusion.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/bench/Fusion.hs 2001-09-09 03:46:40.000000000 +0200 @@ -14,9 +14,9 @@ import qualified Data.Text as T import System.Random -import Data.Text.Prettyprint.Doc -import Data.Text.Prettyprint.Doc.Render.Text -import qualified Text.PrettyPrint.ANSI.Leijen as WL +import Prettyprinter +import Prettyprinter.Render.Text +import qualified Text.PrettyPrint.ANSI.Leijen as WL #if !(APPLICATIVE_MONAD) import Control.Applicative diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/bench/LargeOutput.hs new/prettyprinter-1.7.1/bench/LargeOutput.hs --- old/prettyprinter-1.7.0/bench/LargeOutput.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/bench/LargeOutput.hs 2001-09-09 03:46:40.000000000 +0200 @@ -18,8 +18,8 @@ import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Text.Lazy as TL -import Data.Text.Prettyprint.Doc -import Data.Text.Prettyprint.Doc.Render.Text +import Prettyprinter +import Prettyprinter.Render.Text import GHC.Generics import Test.QuickCheck import Test.QuickCheck.Gen diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/prettyprinter.cabal new/prettyprinter-1.7.1/prettyprinter.cabal --- old/prettyprinter-1.7.0/prettyprinter.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/prettyprinter.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,5 @@ name: prettyprinter -version: 1.7.0 +version: 1.7.1 cabal-version: >= 1.10 category: User Interfaces, Text synopsis: A modern, easy to use, well-documented, extensible pretty-printer. @@ -9,13 +9,12 @@ extra-source-files: README.md , CHANGELOG.md , misc/version-compatibility-macros.h -author: Phil Wadler, Daan Leijen, Max Bolingbroke, Edward Kmett, David Luposchainsky +author: Phil Wadler, Daan Leijen, Max Bolingbroke, Edward Kmett, David Luposchainsky, Simon Jakobi maintainer: Simon Jakobi <simon.jak...@gmail.com>, David Luposchainsky <dluposchainsky at google> bug-reports: http://github.com/quchen/prettyprinter/issues homepage: http://github.com/quchen/prettyprinter build-type: Simple - - +tested-with: GHC==9.0.1, GHC==8.10.4, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 source-repository head type: git @@ -70,7 +69,17 @@ build-depends: base >= 4.5 && < 5 - , text >= 1.2 + + if flag(text) + build-depends: text >= 1.2 + else + -- A fake text package, emulating the same API, but backed by String + hs-source-dirs: src-text + other-modules: + Data.Text + , Data.Text.IO + , Data.Text.Lazy + , Data.Text.Lazy.Builder if !impl(ghc >= 7.6) build-depends: ghc-prim @@ -89,6 +98,14 @@ Description: Build the readme generator Default: False +Flag text + Description: While it's a core value of @prettyprinter@ to use @Text@, there are rare + circumstances (mostly when @prettyprinter@ arises as a dependency of + test suites of packages like @bytestring@ or @text@ themselves) when + this is inconvenient. In this case one can disable this flag, so that + @prettyprinter@ fallbacks to @String@. + Default: True + executable generate_readme hs-source-dirs: app @@ -104,7 +121,7 @@ other-extensions: OverloadedStrings , TemplateHaskell , QuasiQuotes - if flag(buildReadme) + if flag(buildReadme) && flag(text) buildable: True else buildable: False @@ -136,7 +153,7 @@ , prettyprinter , pgp-wordlist >= 0.1 - , bytestring >= 0.10 + , bytestring , quickcheck-instances >= 0.3 , tasty >= 0.10 , tasty-hunit >= 0.9 @@ -148,6 +165,8 @@ if !impl(ghc >= 8.0) build-depends: semigroups >= 0.6 + if !flag(text) + buildable: False benchmark fusion @@ -164,10 +183,13 @@ , text , transformers >= 0.3 , ansi-wl-pprint >= 0.6 - ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N + ghc-options: -Wall -rtsopts default-language: Haskell2010 other-extensions: OverloadedStrings + if !flag(text) + buildable: False + benchmark faster-unsafe-text build-depends: base >= 4.5 && < 5 @@ -178,10 +200,12 @@ hs-source-dirs: bench main-is: FasterUnsafeText.hs - ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall + ghc-options: -rtsopts -Wall default-language: Haskell2010 type: exitcode-stdio-1.0 + if !flag(text) + buildable: False benchmark large-output build-depends: @@ -198,7 +222,7 @@ hs-source-dirs: bench main-is: LargeOutput.hs - ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall + ghc-options: -rtsopts -Wall default-language: Haskell2010 type: exitcode-stdio-1.0 @@ -207,3 +231,6 @@ if !impl(ghc >= 8.0) build-depends: semigroups + + if !flag(text) + buildable: False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Internal/Debug.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Internal/Debug.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Internal/Debug.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Internal/Debug.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Internal.Debug" instead. -module Data.Text.Prettyprint.Doc.Internal.Debug ( +module Data.Text.Prettyprint.Doc.Internal.Debug {-# DEPRECATED "Use \"Prettyprinter.Internal.Debug\" instead." #-} ( module Prettyprinter.Internal.Debug ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Internal/Type.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Internal/Type.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Internal/Type.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Internal/Type.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Internal.Type" instead. -module Data.Text.Prettyprint.Doc.Internal.Type ( +module Data.Text.Prettyprint.Doc.Internal.Type {-# DEPRECATED "Use \"Prettyprinter.Internal.Type\" instead." #-} ( module Prettyprinter.Internal.Type ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Internal.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Internal.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Internal.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Internal.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Internal" instead. -module Data.Text.Prettyprint.Doc.Internal ( +module Data.Text.Prettyprint.Doc.Internal {-# DEPRECATED "Use \"Prettyprinter.Internal\" instead." #-} ( module Prettyprinter.Internal ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/String.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/String.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/String.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/String.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Render.String" instead. -module Data.Text.Prettyprint.Doc.Render.String ( +module Data.Text.Prettyprint.Doc.Render.String {-# DEPRECATED "Use \"Prettyprinter.Render.String\" instead." #-} ( module Prettyprinter.Render.String ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Text.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Text.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Text.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Text.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Render.Text" instead. -module Data.Text.Prettyprint.Doc.Render.Text ( +module Data.Text.Prettyprint.Doc.Render.Text {-# DEPRECATED "Use \"Prettyprinter.Render.Text\" instead." #-} ( module Prettyprinter.Render.Text ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Tutorials/StackMachineTutorial.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Tutorials/StackMachineTutorial.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Tutorials/StackMachineTutorial.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Tutorials/StackMachineTutorial.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Render.Tutorials.StackMachineTutorial" instead. -module Data.Text.Prettyprint.Doc.Render.Tutorials.StackMachineTutorial ( +module Data.Text.Prettyprint.Doc.Render.Tutorials.StackMachineTutorial {-# DEPRECATED "Use \"Prettyprinter.Render.Tutorials.StackMachineTutorial\" instead." #-} ( module Prettyprinter.Render.Tutorials.StackMachineTutorial ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Tutorials/TreeRenderingTutorial.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Tutorials/TreeRenderingTutorial.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Tutorials/TreeRenderingTutorial.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Tutorials/TreeRenderingTutorial.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Render.Tutorials.TreeRenderingTutorial" instead. -module Data.Text.Prettyprint.Doc.Render.Tutorials.TreeRenderingTutorial ( +module Data.Text.Prettyprint.Doc.Render.Tutorials.TreeRenderingTutorial {-# DEPRECATED "Use \"Prettyprinter.Render.Tutorials.TreeRenderingTutorial\" instead." #-} ( module Prettyprinter.Render.Tutorials.TreeRenderingTutorial ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Util/Panic.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Util/Panic.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Util/Panic.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Util/Panic.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Render.Util.Panic" instead. -module Data.Text.Prettyprint.Doc.Render.Util.Panic ( +module Data.Text.Prettyprint.Doc.Render.Util.Panic {-# DEPRECATED "Use \"Prettyprinter.Render.Util.Panic\" instead." #-} ( module Prettyprinter.Render.Util.Panic ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Util/SimpleDocTree.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Util/SimpleDocTree.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Util/SimpleDocTree.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Util/SimpleDocTree.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Render.Util.SimpleDocTree" instead. -module Data.Text.Prettyprint.Doc.Render.Util.SimpleDocTree ( +module Data.Text.Prettyprint.Doc.Render.Util.SimpleDocTree {-# DEPRECATED "Use \"Prettyprinter.Render.Util.SimpleDocTree\" instead." #-} ( module Prettyprinter.Render.Util.SimpleDocTree ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Util/StackMachine.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Util/StackMachine.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Render/Util/StackMachine.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Render/Util/StackMachine.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Render.Util.StackMachine" instead. -module Data.Text.Prettyprint.Doc.Render.Util.StackMachine ( +module Data.Text.Prettyprint.Doc.Render.Util.StackMachine {-# DEPRECATED "Use \"Prettyprinter.Render.Util.StackMachine\" instead." #-} ( module Prettyprinter.Render.Util.StackMachine ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Symbols/Ascii.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Symbols/Ascii.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Symbols/Ascii.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Symbols/Ascii.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Symbols.Ascii" instead. -module Data.Text.Prettyprint.Doc.Symbols.Ascii ( +module Data.Text.Prettyprint.Doc.Symbols.Ascii {-# DEPRECATED "Use \"Prettyprinter.Symbols.Ascii\" instead." #-} ( module Prettyprinter.Symbols.Ascii ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Symbols/Unicode.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Symbols/Unicode.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Symbols/Unicode.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Symbols/Unicode.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Symbols.Unicode" instead. -module Data.Text.Prettyprint.Doc.Symbols.Unicode ( +module Data.Text.Prettyprint.Doc.Symbols.Unicode {-# DEPRECATED "Use \"Prettyprinter.Symbols.Unicode\" instead." #-} ( module Prettyprinter.Symbols.Unicode ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Util.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Util.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc/Util.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc/Util.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter.Util" instead. -module Data.Text.Prettyprint.Doc.Util ( +module Data.Text.Prettyprint.Doc.Util {-# DEPRECATED "Use \"Prettyprinter.Util\" instead." #-} ( module Prettyprinter.Util ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc.hs new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc.hs --- old/prettyprinter-1.7.0/src/Data/Text/Prettyprint/Doc.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Data/Text/Prettyprint/Doc.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,4 @@ --- | This module is part of the old @Data.Text.Prettyprint.Doc@ module hierarchy --- which is being replaced by a shallower @Prettyprinter@ module hierarchy --- offering the same API. --- --- This module will be deprecated and eventually removed. --- --- Use "Prettyprinter" instead. -module Data.Text.Prettyprint.Doc ( +module Data.Text.Prettyprint.Doc {-# DEPRECATED "Use \"Prettyprinter\" instead." #-} ( module Prettyprinter ) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Prettyprinter/Internal.hs new/prettyprinter-1.7.1/src/Prettyprinter/Internal.hs --- old/prettyprinter-1.7.0/src/Prettyprinter/Internal.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Prettyprinter/Internal.hs 2001-09-09 03:46:40.000000000 +0200 @@ -315,7 +315,7 @@ -- | >>> pretty () -- () -- --- The argument is not used, +-- The argument is not used: -- -- >>> pretty (error "Strict?" :: ()) -- () @@ -339,7 +339,11 @@ pretty '\n' = line pretty c = Char c +#ifdef MIN_VERSION_text prettyList = pretty . (id :: Text -> Text) . fromString +#else + prettyList = vsep . map unsafeTextWithoutNewlines . T.splitOn "\n" +#endif -- | Convenience function to convert a 'Show'able value to a 'Doc'. If the -- 'String' does not contain newlines, consider using the more performant @@ -435,6 +439,7 @@ pretty = maybe mempty pretty prettyList = prettyList . catMaybes +#ifdef MIN_VERSION_text -- | Automatically converts all newlines to @'line'@. -- -- >>> pretty ("hello\nworld" :: Text) @@ -451,6 +456,7 @@ -- | (lazy 'Text' instance, identical to the strict version) instance Pretty Lazy.Text where pretty = pretty . Lazy.toStrict +#endif -- | Finding a good example for printing something that does not exist is hard, -- so here is an example of printing a list full of nothing. @@ -732,13 +738,13 @@ -- >>> let prettyDo xs = group ("do" <+> align (encloseSep open close separator xs)) -- >>> let statements = ["name:_ <- getArgs", "let greet = \"Hello, \" <> name", "putStrLn greet"] -- --- This is put into a single line with @{;}@ style if it fits, +-- This is put into a single line with @{;}@ style if it fits: -- -- >>> putDocW 80 (prettyDo statements) -- do { name:_ <- getArgs; let greet = "Hello, " <> name; putStrLn greet } -- -- When there is not enough space the statements are broken up into lines --- nicely, +-- nicely: -- -- >>> putDocW 10 (prettyDo statements) -- do name:_ <- getArgs @@ -778,14 +784,14 @@ -- -- As an example, we will put a document right above another one, regardless of -- the current nesting level. Without 'align'ment, the second line is put simply --- below everything we've had so far, +-- below everything we've had so far: -- -- >>> "lorem" <+> vsep ["ipsum", "dolor"] -- lorem ipsum -- dolor -- -- If we add an 'align' to the mix, the @'vsep'@'s contents all start in the --- same column, +-- same column: -- -- >>> "lorem" <+> align (vsep ["ipsum", "dolor"]) -- lorem ipsum @@ -843,7 +849,7 @@ -- | @('encloseSep' l r sep xs)@ concatenates the documents @xs@ separated by -- @sep@, and encloses the resulting document by @l@ and @r@. -- --- The documents are laid out horizontally if that fits the page, +-- The documents are laid out horizontally if that fits the page: -- -- >>> let doc = "list" <+> align (encloseSep lbracket rbracket comma (map pretty [1,20,300,4000])) -- >>> putDocW 80 doc @@ -934,15 +940,15 @@ -- 'concatWith' (**) [x,y,z] = x ** y ** z -- @ -- --- Multiple convenience definitions based on 'concatWith' are alredy predefined, --- for example +-- Multiple convenience definitions based on 'concatWith' are already predefined, +-- for example: -- -- @ -- 'hsep' = 'concatWith' ('<+>') -- 'fillSep' = 'concatWith' (\\x y -> x '<>' 'softline' '<>' y) -- @ -- --- This is also useful to define customized joiners, +-- This is also useful to define customized joiners: -- -- >>> concatWith (surround dot) ["Prettyprinter", "Render", "Text"] -- Prettyprinter.Render.Text @@ -1092,7 +1098,7 @@ -- instead of newlines. See 'fillSep' if you want a 'space' instead.) -- -- Observe the difference between 'fillSep' and 'fillCat'. 'fillSep' --- concatenates the entries 'space'd when 'group'ed, +-- concatenates the entries 'space'd when 'group'ed: -- -- >>> let docs = take 20 (cycle (["lorem", "ipsum", "dolor", "sit", "amet"])) -- >>> putDocW 40 ("Grouped:" <+> group (fillSep docs)) @@ -1102,7 +1108,7 @@ -- amet -- -- On the other hand, 'fillCat' concatenates the entries directly when --- 'group'ed, +-- 'group'ed: -- -- >>> putDocW 40 ("Grouped:" <+> group (fillCat docs)) -- Grouped: loremipsumdolorsitametlorem @@ -1120,7 +1126,7 @@ -- >>> putDocW 80 ("Docs:" <+> cat docs) -- Docs: loremipsumdolor -- --- When there is enough space, the documents are put above one another, +-- When there is enough space, the documents are put above one another: -- -- >>> putDocW 10 ("Docs:" <+> cat docs) -- Docs: lorem @@ -1364,7 +1370,7 @@ -- | Change the annotation of a 'Doc'ument. -- -- Useful in particular to embed documents with one form of annotation in a more --- generlly annotated document. +-- generally annotated document. -- -- Since this traverses the entire @'Doc'@ tree, including parts that are not -- rendered due to other layouts fitting better, it is preferrable to reannotate @@ -1511,7 +1517,7 @@ -- which is only a single 'SimpleDocStream' entry, and can be processed faster. -- -- It is therefore a good idea to run 'fuse' on concatenations of lots of small --- strings that are used many times, +-- strings that are used many times: -- -- >>> let oftenUsed = fuse Shallow ("a" <> "b" <> pretty 'c' <> "d") -- >>> hsep (replicate 5 oftenUsed) @@ -1844,7 +1850,7 @@ -- >>> let doc = (fun . fun . fun . fun . fun) (align (list ["abcdef", "ghijklm"])) -- -- which we???ll be rendering using the following pipeline (where the layout --- algorithm has been left open), +-- algorithm has been left open): -- -- >>> import Data.Text.IO as T -- >>> import Prettyprinter.Render.Text @@ -1853,7 +1859,7 @@ -- -- If we render this using 'layoutPretty' with a page width of 26 characters -- per line, all the @fun@ calls fit into the first line so they will be put --- there, +-- there: -- -- >>> go layoutPretty doc -- |------------------------| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Prettyprinter/Render/Text.hs new/prettyprinter-1.7.1/src/Prettyprinter/Render/Text.hs --- old/prettyprinter-1.7.0/src/Prettyprinter/Render/Text.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Prettyprinter/Render/Text.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,12 +1,13 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE OverloadedStrings #-} #include "version-compatibility-macros.h" -- | Render an unannotated 'SimpleDocStream' as plain 'Text'. module Prettyprinter.Render.Text ( +#ifdef MIN_VERSION_text -- * Conversion to plain 'Text' renderLazy, renderStrict, +#endif -- * Render to a 'Handle' renderIO, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Prettyprinter/Render/Util/SimpleDocTree.hs new/prettyprinter-1.7.1/src/Prettyprinter/Render/Util/SimpleDocTree.hs --- old/prettyprinter-1.7.0/src/Prettyprinter/Render/Util/SimpleDocTree.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Prettyprinter/Render/Util/SimpleDocTree.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,7 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE OverloadedStrings #-} #include "version-compatibility-macros.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src/Prettyprinter.hs new/prettyprinter-1.7.1/src/Prettyprinter.hs --- old/prettyprinter-1.7.0/src/Prettyprinter.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/src/Prettyprinter.hs 2001-09-09 03:46:40.000000000 +0200 @@ -38,7 +38,10 @@ -- Let???s prettyprint a simple Haskell type definition. First, intersperse @->@ -- and add a leading @::@, -- --- >>> let prettyType = align . sep . zipWith (<+>) ("::" : repeat "->") +-- >>> :{ +-- >>> prettyprintType :: [Doc x] -> Doc x +-- >>> prettyprintType = align . sep . zipWith (<+>) ("::" : repeat "->") +-- >>> :} -- -- The 'sep' function is one way of concatenating documents, there are multiple -- others, e.g. 'vsep', 'cat' and 'fillSep'. In our case, 'sep' space-separates @@ -47,11 +50,11 @@ -- -- Second, prepend the name to the type, -- --- >>> let prettyDecl n tys = pretty n <+> prettyType tys +-- >>> let prettyprintDeclaration n tys = pretty n <+> prettyprintType tys -- -- Now we can define a document that contains some type signature: -- --- >>> let doc = prettyDecl "example" ["Int", "Bool", "Char", "IO ()"] +-- >>> let doc = prettyprintDeclaration "example" ["Int", "Bool", "Char", "IO ()"] -- -- This document can now be printed, and it automatically adapts to available -- space. If the page is wide enough (80 characters in this case), the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src-text/Data/Text/IO.hs new/prettyprinter-1.7.1/src-text/Data/Text/IO.hs --- old/prettyprinter-1.7.0/src-text/Data/Text/IO.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/prettyprinter-1.7.1/src-text/Data/Text/IO.hs 2001-09-09 03:46:40.000000000 +0200 @@ -0,0 +1,13 @@ +-- Provide a fake API, mimicking Data.Text.IO from text package, +-- but actually backed by type Text = String. It is used only in rare +-- circumstances, when prettyprinter is built with -text flag. +-- + +{-# OPTIONS_GHC -fno-warn-missing-signatures #-} + +module Data.Text.IO where + +import qualified System.IO + +hPutStr = System.IO.hPutStr +putStrLn = System.IO.putStrLn diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src-text/Data/Text/Lazy/Builder.hs new/prettyprinter-1.7.1/src-text/Data/Text/Lazy/Builder.hs --- old/prettyprinter-1.7.0/src-text/Data/Text/Lazy/Builder.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/prettyprinter-1.7.1/src-text/Data/Text/Lazy/Builder.hs 2001-09-09 03:46:40.000000000 +0200 @@ -0,0 +1,13 @@ +-- Provide a fake API, mimicking Data.Text.Lazy.Builder from text package, +-- but actually backed by type Builder = String. It is used only in rare +-- circumstances, when prettyprinter is built with -text flag. +-- + +{-# OPTIONS_GHC -fno-warn-missing-signatures #-} + +module Data.Text.Lazy.Builder where + +type Builder = String +fromText = id +singleton = (:[]) +toLazyText = id diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src-text/Data/Text/Lazy.hs new/prettyprinter-1.7.1/src-text/Data/Text/Lazy.hs --- old/prettyprinter-1.7.0/src-text/Data/Text/Lazy.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/prettyprinter-1.7.1/src-text/Data/Text/Lazy.hs 2001-09-09 03:46:40.000000000 +0200 @@ -0,0 +1,15 @@ +-- Provide a fake API, mimicking Data.Text.Lazy from text package, +-- but actually backed by type Text = String. It is used only in rare +-- circumstances, when prettyprinter is built with -text flag. +-- + +{-# OPTIONS_GHC -fno-warn-missing-signatures #-} + +module Data.Text.Lazy where + +import Data.Text as T + +type Text = T.Text +length = T.length +lines = T.lines +toStrict = id diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/src-text/Data/Text.hs new/prettyprinter-1.7.1/src-text/Data/Text.hs --- old/prettyprinter-1.7.0/src-text/Data/Text.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/prettyprinter-1.7.1/src-text/Data/Text.hs 2001-09-09 03:46:40.000000000 +0200 @@ -0,0 +1,46 @@ +-- Provide a fake API, mimicking Data.Text from text package, +-- but actually backed by type Text = String. It is used only in rare +-- circumstances, when prettyprinter is built with -text flag. +-- + +{-# OPTIONS_GHC -fno-warn-missing-signatures #-} + +module Data.Text where + +import Prelude hiding (head, length, null, replicate) +import qualified Data.Char +import qualified Data.List + +type Text = String +cons = (:) +dropWhileEnd = Data.List.dropWhileEnd +head = Data.List.head +intercalate = Data.List.intercalate +length = Data.List.length :: [Char] -> Int +lines = Data.List.lines +map = Data.List.map +null = Data.List.null :: [Char] -> Bool +pack = id +replicate = (Data.List.concat .) . Data.List.replicate +singleton = (:[]) +snoc xs x = xs ++ [x] +stripEnd = dropWhileEnd Data.Char.isSpace +unlines = Data.List.unlines +unpack = id +words = Data.List.words + +uncons :: Text -> Maybe (Char, Text) +uncons [] = Nothing +uncons (x : xs) = Just (x, xs) + +splitOn :: Text -> Text -> [Text] +splitOn pat src + | null pat = error "splitOn: empty pattern" + | otherwise = go [] src + where + go acc [] = [reverse acc] + go acc xs@(y : ys) + | pat `Data.List.isPrefixOf` xs + = reverse acc : go [] (drop (length pat) xs) + | otherwise + = go (y : acc) ys diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/test/Testsuite/Main.hs new/prettyprinter-1.7.1/test/Testsuite/Main.hs --- old/prettyprinter-1.7.0/test/Testsuite/Main.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/test/Testsuite/Main.hs 2001-09-09 03:46:40.000000000 +0200 @@ -15,10 +15,10 @@ import Data.Word import System.Timeout (timeout) -import Data.Text.Prettyprint.Doc -import Data.Text.Prettyprint.Doc.Internal.Debug -import Data.Text.Prettyprint.Doc.Render.Text -import Data.Text.Prettyprint.Doc.Render.Util.StackMachine (renderSimplyDecorated) +import Prettyprinter +import Prettyprinter.Internal.Debug +import Prettyprinter.Render.Text +import Prettyprinter.Render.Util.StackMachine (renderSimplyDecorated) import Test.QuickCheck.Instances.Text () import Test.Tasty diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prettyprinter-1.7.0/test/Testsuite/StripTrailingSpace.hs new/prettyprinter-1.7.1/test/Testsuite/StripTrailingSpace.hs --- old/prettyprinter-1.7.0/test/Testsuite/StripTrailingSpace.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/prettyprinter-1.7.1/test/Testsuite/StripTrailingSpace.hs 2001-09-09 03:46:40.000000000 +0200 @@ -10,8 +10,8 @@ import Data.Text (Text) import qualified Data.Text as T -import Data.Text.Prettyprint.Doc -import Data.Text.Prettyprint.Doc.Render.Util.StackMachine +import Prettyprinter +import Prettyprinter.Render.Util.StackMachine import Test.Tasty import Test.Tasty.HUnit