Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-pandoc-types for 
openSUSE:Factory checked in at 2022-08-01 21:28:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-pandoc-types (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-pandoc-types.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-pandoc-types"

Mon Aug  1 21:28:54 2022 rev:35 rq:985824 version:1.22.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-pandoc-types/ghc-pandoc-types.changes        
2021-11-11 21:37:01.564915086 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-pandoc-types.new.1533/ghc-pandoc-types.changes  
    2022-08-01 21:29:02.937424082 +0200
@@ -1,0 +2,10 @@
+Sat Apr  2 17:12:09 UTC 2022 - Peter Simons <[email protected]>
+
+- Update pandoc-types to version 1.22.2.
+  [1.22.2]
+
+    * Use StrictData in Text.Pandoc.Definition.
+
+    * Add Walkable Meta(Value) Pandoc instances (Travis Cardwell).
+
+-------------------------------------------------------------------

Old:
----
  pandoc-types-1.22.1.tar.gz

New:
----
  pandoc-types-1.22.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-pandoc-types.spec ++++++
--- /var/tmp/diff_new_pack.8vJagB/_old  2022-08-01 21:29:03.501425700 +0200
+++ /var/tmp/diff_new_pack.8vJagB/_new  2022-08-01 21:29:03.505425711 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-pandoc-types
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 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 pandoc-types
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.22.1
+Version:        1.22.2
 Release:        0
 Summary:        Types for representing a structured document
 License:        GPL-2.0-only

++++++ pandoc-types-1.22.1.tar.gz -> pandoc-types-1.22.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.22.1/changelog 
new/pandoc-types-1.22.2/changelog
--- old/pandoc-types-1.22.1/changelog   2021-10-22 23:09:19.000000000 +0200
+++ new/pandoc-types-1.22.2/changelog   2022-04-02 08:18:38.000000000 +0200
@@ -1,3 +1,9 @@
+[1.22.2]
+
+  * Use StrictData in Text.Pandoc.Definition.
+
+  * Add Walkable Meta(Value) Pandoc instances (Travis Cardwell).
+
 [1.22.1]
 
   * Text.Pandoc.Builder: add simpleFigure, simpleFigureWith,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.22.1/pandoc-types.cabal 
new/pandoc-types-1.22.2/pandoc-types.cabal
--- old/pandoc-types-1.22.1/pandoc-types.cabal  2021-10-22 22:50:10.000000000 
+0200
+++ new/pandoc-types-1.22.2/pandoc-types.cabal  2022-03-11 18:52:15.000000000 
+0100
@@ -1,6 +1,6 @@
 cabal-version:       2.2
 Name:                pandoc-types
-version:             1.22.1
+version:             1.22.2
 Synopsis:            Types for representing a structured document
 Description:         @Text.Pandoc.Definition@ defines the 'Pandoc' data
                      structure, which is used by pandoc to represent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.22.1/src/Text/Pandoc/Definition.hs 
new/pandoc-types-1.22.2/src/Text/Pandoc/Definition.hs
--- old/pandoc-types-1.22.1/src/Text/Pandoc/Definition.hs       2021-10-22 
22:13:17.000000000 +0200
+++ new/pandoc-types-1.22.2/src/Text/Pandoc/Definition.hs       2022-03-30 
20:21:20.000000000 +0200
@@ -1,6 +1,6 @@
 {-# LANGUAGE OverloadedStrings, DeriveDataTypeable, DeriveGeneric,
     FlexibleContexts, GeneralizedNewtypeDeriving, PatternGuards, CPP,
-    TemplateHaskell , PatternSynonyms, ViewPatterns #-}
+    TemplateHaskell , PatternSynonyms, ViewPatterns, StrictData #-}
 
 {-
 Copyright (c) 2006-2019, John MacFarlane
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.22.1/src/Text/Pandoc/JSON.hs 
new/pandoc-types-1.22.2/src/Text/Pandoc/JSON.hs
--- old/pandoc-types-1.22.1/src/Text/Pandoc/JSON.hs     2021-10-01 
23:26:40.000000000 +0200
+++ new/pandoc-types-1.22.2/src/Text/Pandoc/JSON.hs     2022-03-11 
18:52:04.000000000 +0100
@@ -86,7 +86,7 @@
 -- to stdout.
 --
 -- For a straight transformation, use a function of type @a -> a@ or
--- @a -> IO a@ where @a@ = 'Block', 'Inline','Pandoc', 'Meta', or 'MetaValue'.
+-- @a -> IO a@ where @a@ = 'Block', 'Inline', 'Pandoc', 'Meta', or 'MetaValue'.
 --
 -- If your transformation needs to be sensitive to the script's arguments,
 -- use a function of type @[String] -> a -> a@ (with @a@ constrained as above).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.22.1/src/Text/Pandoc/Walk.hs 
new/pandoc-types-1.22.2/src/Text/Pandoc/Walk.hs
--- old/pandoc-types-1.22.1/src/Text/Pandoc/Walk.hs     2021-10-22 
22:13:17.000000000 +0200
+++ new/pandoc-types-1.22.2/src/Text/Pandoc/Walk.hs     2022-03-11 
18:52:04.000000000 +0100
@@ -98,6 +98,7 @@
   , queryCitation
   , queryInline
   , queryMetaValue
+  , queryMetaValue'
   , queryPandoc
   , walkBlockM
   , walkCaptionM
@@ -109,12 +110,14 @@
   , walkCitationM
   , walkInlineM
   , walkMetaValueM
+  , walkMetaValueM'
   , walkPandocM
   )
 where
 import Control.Applicative (Applicative ((<*>), pure), (<$>))
 import Control.Monad ((>=>))
 import Data.Functor.Identity (Identity (runIdentity))
+import qualified Data.Map as M
 import Text.Pandoc.Definition
 import qualified Data.Traversable as T
 import Data.Traversable (Traversable)
@@ -209,6 +212,14 @@
   walkM = walkPandocM
   query = queryPandoc
 
+instance Walkable Meta Pandoc where
+  walkM f (Pandoc m bs) = Pandoc <$> f m <*> pure bs
+  query f (Pandoc m _) = f m
+
+instance Walkable MetaValue Pandoc where
+  walkM f (Pandoc m bs) = Pandoc <$> walkM f m <*> pure bs
+  query f (Pandoc m _) = query f m
+
 instance Walkable Pandoc Pandoc where
   walkM f = f
   query f = f
@@ -236,9 +247,18 @@
   walkM f (Meta metamap) = Meta <$> walkM f metamap
   query f (Meta metamap) = query f metamap
 
+instance Walkable MetaValue Meta where
+  walkM f (Meta metamap) =
+    Meta . M.fromAscList <$> mapM (\(k, v) -> (,) k <$> walkM f v) 
(M.toAscList metamap)
+  query f (Meta metamap) = M.foldMapWithKey (const $ query f) metamap
+
 --
 -- Walk MetaValue
 --
+instance Walkable MetaValue MetaValue where
+  walkM f x = walkMetaValueM' f x >>= f
+  query f x = f x <> queryMetaValue' f x
+
 instance Walkable Inline MetaValue where
   walkM = walkMetaValueM
   query = queryMetaValue
@@ -513,6 +533,14 @@
 walkMetaValueM f (MetaBlocks bs)  = MetaBlocks <$> walkM f bs
 walkMetaValueM f (MetaMap m)      = MetaMap <$> walkM f m
 
+-- | Helper method to walk @'MetaValue'@ nodes nested below @'MetaValue'@ 
nodes.
+walkMetaValueM' :: (Monad f, Applicative f, Functor f)
+                => (MetaValue -> f MetaValue) -> MetaValue -> f MetaValue
+walkMetaValueM' f (MetaMap m) =
+    MetaMap . M.fromAscList <$> mapM (\(k, v) -> (,) k <$> walkM f v) 
(M.toAscList m)
+walkMetaValueM' f (MetaList xs) = MetaList <$> mapM (walkM f) xs
+walkMetaValueM' _ x = return x
+
 -- | Perform a query on elements nested below a @'MetaValue'@ element by
 -- querying all directly nested lists of @Inline@s, list of @Block@s, or
 -- lists or maps of @MetaValue@s.
@@ -526,6 +554,14 @@
 queryMetaValue f (MetaBlocks bs)  = query f bs
 queryMetaValue f (MetaMap m)      = query f m
 
+-- | Perform a query on @'MetaValue'@ elements nested below a @'MetaValue'@
+-- element
+queryMetaValue' :: Monoid c
+                => (MetaValue -> c) -> MetaValue -> c
+queryMetaValue' f (MetaMap m)   = M.foldMapWithKey (const $ query f) m
+queryMetaValue' f (MetaList xs) = mconcat $ map (query f) xs
+queryMetaValue' _ _             = mempty
+
 -- | Helper method to walk to elements nested below @'Citation'@ nodes.
 --
 -- The non-inline contents of a citation will remain unchanged during 
traversal.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.22.1/test/test-pandoc-types.hs 
new/pandoc-types-1.22.2/test/test-pandoc-types.hs
--- old/pandoc-types-1.22.1/test/test-pandoc-types.hs   2021-10-22 
22:13:17.000000000 +0200
+++ new/pandoc-types-1.22.2/test/test-pandoc-types.hs   2022-03-11 
18:52:04.000000000 +0100
@@ -67,6 +67,14 @@
 blocksTrans [Div _ xs] = xs
 blocksTrans xs = xs
 
+metaValueTrans :: MetaValue -> MetaValue
+metaValueTrans (MetaBool x) = MetaBool $ not x
+metaValueTrans (MetaString xs) = MetaString $ T.toUpper xs
+metaValueTrans x = x
+
+metaTrans :: Meta -> Meta
+metaTrans (Meta metamap) = Meta $ M.mapKeys T.toUpper metamap
+
 inlineQuery :: Inline -> Text
 inlineQuery (Str xs) = xs
 inlineQuery _ = ""
@@ -81,6 +89,12 @@
 blocksQuery :: [Block] -> Monoid.Sum Int
 blocksQuery = Monoid.Sum . length
 
+metaValueQuery :: MetaValue -> Text
+metaValueQuery (MetaString xs) = xs
+metaValueQuery _ = ""
+
+metaQuery :: Meta -> Monoid.Sum Int
+metaQuery (Meta metamap) = Monoid.Sum $ M.size metamap
 
 prop_roundtrip :: Pandoc -> Bool
 prop_roundtrip doc = case decode $ encode doc :: (Maybe Pandoc) of
@@ -659,8 +673,12 @@
   [ testGroup "Walk"
     [ testProperty "p_walk inlineTrans" (p_walk inlineTrans)
     , testProperty "p_walk blockTrans" (p_walk blockTrans)
+    , testProperty "p_walk metaValueTrans" (p_walk metaValueTrans)
+    , testProperty "p_walk metaTrans" (p_walk metaTrans)
     , testProperty "p_query inlineQuery" (p_query inlineQuery)
     , testProperty "p_query blockQuery" (p_query blockQuery)
+    , testProperty "p_query metaValueQuery" (p_query metaValueQuery)
+    , testProperty "p_query metaQuery" (p_query metaQuery)
     , testProperty "p_walkList inlinesTrans"  (p_walkList inlinesTrans)
     , testProperty "p_queryList inlinesQuery" (p_queryList inlinesQuery)
     , testProperty "p_walkList blocksTrans"  (p_walkList blocksTrans)

Reply via email to