commit ghc-show-prettyprint for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-show-prettyprint for openSUSE:Factory checked in at 2017-08-31 20:59:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-show-prettyprint (Old) and /work/SRC/openSUSE:Factory/.ghc-show-prettyprint.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-show-prettyprint" Thu Aug 31 20:59:36 2017 rev:3 rq:513495 version:0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-show-prettyprint/ghc-show-prettyprint.changes 2017-06-22 10:38:59.401490746 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-show-prettyprint.new/ghc-show-prettyprint.changes 2017-08-31 20:59:37.480767187 +0200 @@ -1,0 +2,5 @@ +Thu Jul 27 14:07:44 UTC 2017 - psimons@suse.com + +- Update to version 0.2 revision 1. + +------------------------------------------------------------------- Old: ---- show-prettyprint-0.1.2.1.tar.gz New: ---- show-prettyprint-0.2.tar.gz show-prettyprint.cabal ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-show-prettyprint.spec ++++++ --- /var/tmp/diff_new_pack.YWOK1m/_old 2017-08-31 20:59:38.816579502 +0200 +++ /var/tmp/diff_new_pack.YWOK1m/_new 2017-08-31 20:59:38.844575569 +0200 @@ -19,15 +19,17 @@ %global pkg_name show-prettyprint %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.1.2.1 +Version: 0.2 Release: 0 Summary: Robust prettyprinter for output of auto-generated Show instances License: BSD-3-Clause Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-ansi-wl-pprint-devel +BuildRequires: ghc-prettyprinter-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-trifecta-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -52,6 +54,7 @@ %prep %setup -q -n %{pkg_name}-%{version} +cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build @@ -74,6 +77,6 @@ %files devel -f %{name}-devel.files %defattr(-,root,root,-) -%doc README.md +%doc CHANGELOG.md README.md %changelog ++++++ show-prettyprint-0.1.2.1.tar.gz -> show-prettyprint-0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/show-prettyprint-0.1.2.1/CHANGELOG.md new/show-prettyprint-0.2/CHANGELOG.md --- old/show-prettyprint-0.1.2.1/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100 +++ new/show-prettyprint-0.2/CHANGELOG.md 2017-06-01 17:17:24.000000000 +0200 @@ -0,0 +1,5 @@ +# 0.2 + +Prettyprint based on the `prettyprinter` library, instead of `ansi-wl-pprint`. +To support the `Diagnostic` module, the Trifecta-generated `Doc` has to be +rendered still, so we cannot drop the dependency on ansi-wl-pprint just yet. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/show-prettyprint-0.1.2.1/show-prettyprint.cabal new/show-prettyprint-0.2/show-prettyprint.cabal --- old/show-prettyprint-0.1.2.1/show-prettyprint.cabal 2017-06-01 15:26:58.000000000 +0200 +++ new/show-prettyprint-0.2/show-prettyprint.cabal 2017-06-01 17:17:46.000000000 +0200 @@ -1,5 +1,5 @@ name: show-prettyprint -version: 0.1.2.1 +version: 0.2 synopsis: Robust prettyprinter for output of auto-generated Show instances description: See README.md @@ -12,6 +12,7 @@ category: User Interfaces, Text build-type: Simple extra-source-files: README.md + , CHANGELOG.md , .stylish-haskell.yaml cabal-version: >=1.10 @@ -22,9 +23,9 @@ , Text.Show.Prettyprint.Internal build-depends: base >= 4.7 && < 5 , trifecta >= 1.6 + , prettyprinter < 1.1 - -- Transitive dependency of Trifecta, so let the - -- version be sorted out by that + -- Transitive dep of Trifecta, figure it out via that one , ansi-wl-pprint ghc-options: -Wall default-language: Haskell2010 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/show-prettyprint-0.1.2.1/src/Text/Show/Prettyprint/Diagnostic.hs new/show-prettyprint-0.2/src/Text/Show/Prettyprint/Diagnostic.hs --- old/show-prettyprint-0.1.2.1/src/Text/Show/Prettyprint/Diagnostic.hs 2016-11-14 10:51:47.000000000 +0100 +++ new/show-prettyprint-0.2/src/Text/Show/Prettyprint/Diagnostic.hs 2017-06-01 17:13:04.000000000 +0200 @@ -17,9 +17,9 @@ -import Data.Monoid -import Text.PrettyPrint.ANSI.Leijen as Ppr hiding ((<>)) -import Text.Trifecta as Tri +import Data.Text.Prettyprint.Doc +import qualified Text.PrettyPrint.ANSI.Leijen as OldAnsiPpr +import Text.Trifecta as Tri import Text.Show.Prettyprint.Internal @@ -30,7 +30,7 @@ prettifyShowErr :: String -> String prettifyShowErr s = case parseString shownP mempty s of Success x -> show x - Failure ErrInfo{ _errDoc = e } -> "ERROR " <> show (plain e) + Failure ErrInfo{ _errDoc = e } -> "ERROR " <> show (OldAnsiPpr.plain e) -- | 'prettifyShowErr' with the 'show' baked in. prettyShowErr :: Show a => a -> String diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/show-prettyprint-0.1.2.1/src/Text/Show/Prettyprint/Internal.hs new/show-prettyprint-0.2/src/Text/Show/Prettyprint/Internal.hs --- old/show-prettyprint-0.1.2.1/src/Text/Show/Prettyprint/Internal.hs 2016-11-14 11:26:22.000000000 +0100 +++ new/show-prettyprint-0.2/src/Text/Show/Prettyprint/Internal.hs 2017-06-01 17:15:05.000000000 +0200 @@ -19,12 +19,14 @@ import Control.Applicative -import Text.PrettyPrint.ANSI.Leijen as Ppr hiding ((<>)) -import Text.Trifecta as Tri +import Data.Text.Prettyprint.Doc as Ppr +import Text.Trifecta as Tri -- $setup +-- +-- >>> import Text.PrettyPrint.ANSI.Leijen (plain) -- >>> :{ -- let testParse p s = case parseString p mempty s of -- Success x -> print x @@ -34,7 +36,7 @@ -- | Prettyparser for a 'show'-generated string -shownP :: Parser Doc +shownP :: Parser (Doc ann) shownP = valueP <* eof -- | Prettyparser for a constructor, which is roughly a word applied to @@ -42,7 +44,7 @@ -- -- >>> testParse valueP "Just ('c', Left ())" -- Just ('c',Left ()) -valueP :: Parser Doc +valueP :: Parser (Doc ann) valueP = do thing <- choice [identifierP, numberP, stringLitP, charLitP] args <- many argP @@ -55,10 +57,10 @@ -- -- >>> testParse identifierP "_foo'bar" -- _foo'bar -identifierP :: Parser Doc +identifierP :: Parser (Doc ann) identifierP = token (p <?> "identifier") where - p = fmap Ppr.text (some (alphaNum <|> oneOf "'_")) + p = fmap Ppr.pretty (some (alphaNum <|> oneOf "'_")) -- | Number in integer or scientific notation. -- @@ -67,28 +69,28 @@ -- -- >>> testParse numberP "-123.4e56" -- -1.234e58 -numberP :: Parser Doc +numberP :: Parser (Doc ann) numberP = p <?> "number" where p = integerOrDouble >>= \case - Left i -> pure (Ppr.integer i) - Right d -> pure (Ppr.double d) + Left i -> pure (pretty i) + Right d -> pure (pretty d) -- | -- >>> testParse stringLitP "\"Hello world!\"" -- "Hello world!" -stringLitP :: Parser Doc +stringLitP :: Parser (Doc ann) stringLitP = token (p <?> "string literal") where - p = fmap (dquotes . Ppr.string) stringLiteral + p = fmap (dquotes . pretty) (stringLiteral :: Parser String) -- | -- >>> testParse charLitP "'c'" -- 'c' -charLitP :: Parser Doc +charLitP :: Parser (Doc ann) charLitP = token (p <?> "char literal") where - p = fmap (squotes . Ppr.char) Tri.charLiteral + p = fmap (squotes . pretty) Tri.charLiteral -- | Anything that could be considered an argument to something else. -- @@ -97,23 +99,23 @@ -- -- >>> testParse argP "['h', 'e', 'l', 'l', 'o']" -- ['h','e','l','l','o'] -argP :: Parser Doc +argP :: Parser (Doc ann) argP = (token . choice) [unitP, tupleP, listP, recordP, valueP] -- | -- >>> testParse unitP "()" -- () -unitP :: Parser Doc +unitP :: Parser (Doc ann) unitP = p <?> "unit" where - p = fmap Ppr.string (Tri.string "()") + p = fmap pretty (Tri.string "()") -- | Prettyparser for tuples from size 1. Since 1-tuples are just parenthesized -- expressions to first order approximation, this parser handles those as well. -- -- >>> testParse tupleP "((), True, 'c')" -- ((),True,'c') -tupleP :: Parser Doc +tupleP :: Parser (Doc ann) tupleP = p <?> "tuple" where p = fmap (encloseSep lparen rparen Ppr.comma) (Tri.parens (do @@ -126,7 +128,7 @@ -- -- >>> testParse listP "[\"Hello\", World]" -- ["Hello",World] -listP :: Parser Doc +listP :: Parser (Doc ann) listP = p <?> "list" where p = fmap (encloseSep lbracket rbracket Ppr.comma) @@ -135,7 +137,7 @@ -- | -- >>> testParse recordP "{ r1 = (), r2 = Just True }" -- {r1 = (),r2 = Just True} -recordP :: Parser Doc +recordP :: Parser (Doc ann) recordP = p <?> "record" where p = fmap (encloseSep lbrace rbrace Ppr.comma) (Tri.braces (sepBy recordEntryP Tri.comma)) @@ -143,4 +145,4 @@ lhs <- token identifierP _ <- token (Tri.char '=') rhs <- argP - pure (lhs <+> Ppr.string "=" <+> rhs) + pure (lhs <+> pretty "=" <+> rhs) ++++++ show-prettyprint.cabal ++++++ name: show-prettyprint version: 0.2 x-revision: 1 synopsis: Robust prettyprinter for output of auto-generated Show instances description: See README.md homepage: https://github.com/quchen/show-prettyprint#readme license: BSD3 license-file: LICENSE.md author: David Luposchainsky <dluposchainsky (λ) google> maintainer: David Luposchainsky <dluposchainsky (λ) google> copyright: David Luposchainsky, 2016 category: User Interfaces, Text build-type: Simple extra-source-files: README.md , CHANGELOG.md , .stylish-haskell.yaml cabal-version: >=1.10 library hs-source-dirs: src exposed-modules: Text.Show.Prettyprint , Text.Show.Prettyprint.Diagnostic , Text.Show.Prettyprint.Internal build-depends: base >= 4.7 && < 5 , trifecta >= 1.6 , prettyprinter < 1.2 -- Transitive dep of Trifecta, figure it out via that one , ansi-wl-pprint ghc-options: -Wall default-language: Haskell2010 test-suite doctest type: exitcode-stdio-1.0 hs-source-dirs: test/Doctest main-is: Main.hs build-depends: base , doctest >= 0.9 ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N default-language: Haskell2010 source-repository head type: git location: https://github.com/quchen/show-prettyprint
participants (1)
-
root@hilbert.suse.de