Hello community, here is the log from the commit of package ghc-pandoc-types for openSUSE:Factory checked in at 2018-10-25 09:08:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-pandoc-types (Old) and /work/SRC/openSUSE:Factory/.ghc-pandoc-types.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-pandoc-types" Thu Oct 25 09:08:00 2018 rev:20 rq:643498 version:1.17.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-pandoc-types/ghc-pandoc-types.changes 2018-07-24 17:20:58.959192179 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-pandoc-types.new/ghc-pandoc-types.changes 2018-10-25 09:08:03.778443310 +0200 @@ -1,0 +2,9 @@ +Sat Oct 20 02:01:51 UTC 2018 - [email protected] + +- Update pandoc-types to version 1.17.5.2. + [1.17.5.2] + + * Bump upper bound for deepseq-generics, QuickCheck, criterion. + * Implement QuickCheck shrinking for Inlines and Blocks (Alexander Krotov). + +------------------------------------------------------------------- Old: ---- pandoc-types-1.17.5.1.tar.gz New: ---- pandoc-types-1.17.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-pandoc-types.spec ++++++ --- /var/tmp/diff_new_pack.XJog5t/_old 2018-10-25 09:08:04.578442832 +0200 +++ /var/tmp/diff_new_pack.XJog5t/_new 2018-10-25 09:08:04.578442832 +0200 @@ -12,14 +12,14 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %global pkg_name pandoc-types %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.17.5.1 +Version: 1.17.5.2 Release: 0 Summary: Types for representing a structured document License: GPL-2.0-only ++++++ pandoc-types-1.17.5.1.tar.gz -> pandoc-types-1.17.5.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-types-1.17.5.1/Text/Pandoc/Arbitrary.hs new/pandoc-types-1.17.5.2/Text/Pandoc/Arbitrary.hs --- old/pandoc-types-1.17.5.1/Text/Pandoc/Arbitrary.hs 2018-06-10 19:21:52.000000000 +0200 +++ new/pandoc-types-1.17.5.2/Text/Pandoc/Arbitrary.hs 2018-10-19 23:26:03.000000000 +0200 @@ -22,12 +22,95 @@ instance Arbitrary Inlines where arbitrary = (fromList :: [Inline] -> Inlines) <$> arbitrary + shrink = fmap fromList . ((++) <$> shrink <*> flattenShrinkInlines) . toList + where flattenShrinkInlines (x:xs) = + let x' = flattenInline x + in (if null x' then [] else [x' ++ xs]) ++ [x:xs' | xs' <- flattenShrinkInlines xs] + flattenShrinkInlines [] = [] + flattenInline :: Inline -> [Inline] + flattenInline (Str _) = [] + flattenInline (Emph ils) = ils + flattenInline (Strong ils) = ils + flattenInline (Strikeout ils) = ils + flattenInline (Superscript ils) = ils + flattenInline (Subscript ils) = ils + flattenInline (SmallCaps ils) = ils + flattenInline (Quoted _ ils) = ils + flattenInline (Cite _ ils) = ils + flattenInline Code{} = [] + flattenInline Space = [] + flattenInline SoftBreak = [] + flattenInline LineBreak = [] + flattenInline Math{} = [] + flattenInline RawInline{} = [] + flattenInline (Link _ ils _) = ils + flattenInline (Image _ ils _) = ils + flattenInline Note{} = [] + flattenInline (Span _ ils) = ils instance Arbitrary Blocks where arbitrary = (fromList :: [Block] -> Blocks) <$> arbitrary + shrink = fmap fromList . ((++) <$> shrink <*> flattenShrinkBlocks) . toList + where flattenShrinkBlocks (x:xs) = + let x' = flattenBlock x + in (if null x' then [] else [x' ++ xs]) ++ [x:xs' | xs' <- flattenShrinkBlocks xs] + flattenShrinkBlocks [] = [] + flattenBlock :: Block -> [Block] + flattenBlock Plain{} = [] + flattenBlock Para{} = [] + flattenBlock (LineBlock lns) = [Para x | x <- lns] + flattenBlock CodeBlock{} = [] + flattenBlock RawBlock{} = [] + flattenBlock (BlockQuote blks) = blks + flattenBlock (OrderedList _ blksList) = concat blksList + flattenBlock (BulletList blksList) = concat blksList + flattenBlock (DefinitionList defs) = concat [Para ils:concat blks | (ils, blks) <- defs] + flattenBlock (Header _ _ ils) = [Para ils] + flattenBlock HorizontalRule = [] + flattenBlock (Table caption _ _ cells rows) = Para caption : concat (concat $ cells:rows) + flattenBlock (Div _ blks) = blks + flattenBlock Null = [] + +shrinkInlineList :: [Inline] -> [[Inline]] +shrinkInlineList = fmap toList . shrink . fromList + +shrinkInlinesList :: [[Inline]] -> [[[Inline]]] +shrinkInlinesList = fmap (fmap toList) . shrink . fmap fromList + +shrinkBlockList :: [Block] -> [[Block]] +shrinkBlockList = fmap toList . shrink . fromList + +shrinkBlocksList :: [[Block]] -> [[[Block]]] +shrinkBlocksList = fmap (fmap toList) . shrink . fmap fromList instance Arbitrary Inline where arbitrary = resize 3 $ arbInline 2 + shrink (Str s) = Str <$> shrink s + shrink (Emph ils) = Emph <$> shrinkInlineList ils + shrink (Strong ils) = Strong <$> shrinkInlineList ils + shrink (Strikeout ils) = Strikeout <$> shrinkInlineList ils + shrink (Superscript ils) = Superscript <$> shrinkInlineList ils + shrink (Subscript ils) = Subscript <$> shrinkInlineList ils + shrink (SmallCaps ils) = SmallCaps <$> shrinkInlineList ils + shrink (Quoted qtype ils) = Quoted qtype <$> shrinkInlineList ils + shrink (Cite cits ils) = (Cite cits <$> shrinkInlineList ils) + ++ (flip Cite ils <$> shrink cits) + shrink (Code attr s) = (Code attr <$> shrink s) + ++ (flip Code s <$> shrink attr) + shrink Space = [] + shrink SoftBreak = [] + shrink LineBreak = [] + shrink (Math mtype s) = Math mtype <$> shrink s + shrink (RawInline fmt s) = RawInline fmt <$> shrink s + shrink (Link attr ils target) = [Link attr ils' target | ils' <- shrinkInlineList ils] + ++ [Link attr ils target' | target' <- shrink target] + ++ [Link attr' ils target | attr' <- shrink attr] + shrink (Image attr ils target) = [Image attr ils' target | ils' <- shrinkInlineList ils] + ++ [Image attr ils target' | target' <- shrink target] + ++ [Image attr' ils target | attr' <- shrink attr] + shrink (Note blks) = Note <$> shrinkBlockList blks + shrink (Span attr s) = (Span attr <$> shrink s) + ++ (flip Span s <$> shrink attr) arbInlines :: Int -> Gen [Inline] arbInlines n = listOf1 (arbInline n) `suchThat` (not . startsWithSpace) @@ -64,6 +147,46 @@ instance Arbitrary Block where arbitrary = resize 3 $ arbBlock 2 + shrink (Plain ils) = Plain <$> shrinkInlineList ils + shrink (Para ils) = Para <$> shrinkInlineList ils + shrink (LineBlock lns) = LineBlock <$> shrinkInlinesList lns + shrink (CodeBlock attr s) = (CodeBlock attr <$> shrink s) + ++ (flip CodeBlock s <$> shrink attr) + shrink (RawBlock fmt s) = RawBlock fmt <$> shrink s + shrink (BlockQuote blks) = BlockQuote <$> shrinkBlockList blks + shrink (OrderedList listAttrs blksList) = OrderedList listAttrs <$> shrinkBlocksList blksList + shrink (BulletList blksList) = BulletList <$> shrinkBlocksList blksList + shrink (DefinitionList defs) = DefinitionList <$> shrinkDefinitionList defs + where shrinkDefinition (ils, blksList) = [(ils', blksList) | ils' <- shrinkInlineList ils] + ++ [(ils, blksList') | blksList' <- shrinkBlocksList blksList] + shrinkDefinitionList (x:xs) = [xs] + ++ [x':xs | x' <- shrinkDefinition x] + ++ [x:xs' | xs' <- shrinkDefinitionList xs] + shrinkDefinitionList [] = [] + shrink (Header n attr ils) = (Header n attr <$> shrinkInlineList ils) + ++ (flip (Header n) ils <$> shrink attr) + shrink HorizontalRule = [] + shrink (Table caption aligns widths cells rows) = + -- TODO: shrink number of columns + -- Shrink header contents + [Table caption aligns widths cells' rows | cells' <- shrinkRow cells] ++ + -- Shrink number of rows and row contents + [Table caption aligns widths cells rows' | rows' <- shrinkRows rows] ++ + -- Shrink caption + [Table caption' aligns widths cells rows | caption' <- shrinkInlineList caption] + where -- Shrink row contents without reducing the number of columns + shrinkRow :: [TableCell] -> [[TableCell]] + shrinkRow (x:xs) = [x':xs | x' <- shrinkBlockList x] + ++ [x:xs' | xs' <- shrinkRow xs] + shrinkRow [] = [] + shrinkRows :: [[TableCell]] -> [[[TableCell]]] + shrinkRows (x:xs) = [xs] -- Shrink number of rows + ++ [x':xs | x' <- shrinkRow x] -- Shrink row contents + ++ [x:xs' | xs' <- shrinkRows xs] + shrinkRows [] = [] + shrink (Div attr blks) = (Div attr <$> shrinkBlockList blks) + ++ (flip Div blks <$> shrink attr) + shrink Null = [] arbBlock :: Int -> Gen Block arbBlock n = frequency $ [ (10, Plain <$> arbInlines (n-1)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-types-1.17.5.1/changelog new/pandoc-types-1.17.5.2/changelog --- old/pandoc-types-1.17.5.1/changelog 2018-06-13 01:07:10.000000000 +0200 +++ new/pandoc-types-1.17.5.2/changelog 2018-10-19 23:26:03.000000000 +0200 @@ -1,3 +1,8 @@ +[1.17.5.2] + + * Bump upper bound for deepseq-generics, QuickCheck, criterion. + * Implement QuickCheck shrinking for Inlines and Blocks (Alexander Krotov). + [1.17.5.1] * Declare the ToMetaValue instance for String as OVERLAPPING (#46). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-types-1.17.5.1/pandoc-types.cabal new/pandoc-types-1.17.5.2/pandoc-types.cabal --- old/pandoc-types-1.17.5.1/pandoc-types.cabal 2018-06-13 01:06:31.000000000 +0200 +++ new/pandoc-types-1.17.5.2/pandoc-types.cabal 2018-10-19 23:26:03.000000000 +0200 @@ -1,5 +1,5 @@ Name: pandoc-types -Version: 1.17.5.1 +Version: 1.17.5.2 Synopsis: Types for representing a structured document Description: @Text.Pandoc.Definition@ defines the 'Pandoc' data structure, which is used by pandoc to represent @@ -53,11 +53,11 @@ bytestring >= 0.9 && < 0.11, aeson >= 0.6.2 && < 1.5, transformers >= 0.2 && < 0.6, - QuickCheck >= 2 + QuickCheck >= 2.4 && < 2.13 if !impl(ghc >= 8.0) Build-depends: semigroups == 0.18.* if impl(ghc < 7.10) - Build-depends: deepseq-generics >= 0.1 && < 0.2 + Build-depends: deepseq-generics >= 0.1 && < 0.3 else Build-depends: deepseq >= 1.4.1 && < 1.5 ghc-options: -Wall @@ -75,7 +75,7 @@ test-framework >= 0.3 && < 0.9, test-framework-hunit >= 0.2 && < 0.4, test-framework-quickcheck2 >= 0.2.9 && < 0.4, - QuickCheck >= 2.4 && < 2.12, + QuickCheck >= 2.4 && < 2.13, HUnit >= 1.2 && < 1.7, string-qq == 0.0.2 ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -O2 @@ -86,5 +86,5 @@ hs-source-dirs: benchmark build-depends: pandoc-types, base >= 4.5 && < 5, - criterion >= 1.0 && < 1.5 + criterion >= 1.0 && < 1.6 ghc-options: -rtsopts -Wall -fno-warn-unused-do-bind -O2
