Hello community,

here is the log from the commit of package ghc-pandoc-types for 
openSUSE:Factory checked in at 2016-02-03 10:19:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-pandoc-types (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-pandoc-types.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-pandoc-types"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-pandoc-types/ghc-pandoc-types.changes        
2015-10-06 13:24:25.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-pandoc-types.new/ghc-pandoc-types.changes   
2016-02-03 10:19:26.000000000 +0100
@@ -1,0 +2,7 @@
+Sat Jan 23 09:29:37 UTC 2016 - [email protected]
+
+- update to 1.16.0.1
+* Added Attr field to Image and Link.
+* Added SoftBreak constructor to Inline
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ ghc-pandoc-types.spec ++++++
--- /var/tmp/diff_new_pack.1zUqvu/_old  2016-02-03 10:19:27.000000000 +0100
+++ /var/tmp/diff_new_pack.1zUqvu/_new  2016-02-03 10:19:27.000000000 +0100
@@ -19,7 +19,7 @@
 %global pkg_name pandoc-types
 
 Name:           ghc-pandoc-types
-Version:        1.12.4.7
+Version:        1.16.0.1
 Release:        0
 Summary:        Types for representing a structured document
 License:        GPL-2.0
@@ -35,6 +35,7 @@
 BuildRequires:  ghc-aeson-devel
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-containers-devel
+BuildRequires:  ghc-deepseq-devel
 BuildRequires:  ghc-deepseq-generics-devel
 BuildRequires:  ghc-syb-devel
 # End cabal-rpm deps

++++++ pandoc-types-1.12.4.7.tar.gz -> pandoc-types-1.16.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.12.4.7/Text/Pandoc/Builder.hs 
new/pandoc-types-1.16.0.1/Text/Pandoc/Builder.hs
--- old/pandoc-types-1.12.4.7/Text/Pandoc/Builder.hs    2015-09-23 
21:29:27.000000000 +0200
+++ new/pandoc-types-1.16.0.1/Text/Pandoc/Builder.hs    2016-01-06 
19:26:25.000000000 +0100
@@ -58,7 +58,7 @@
 >           [Para [Str "item",Space,Str "one"]
 >           ,Para [Str "continuation"]]
 >          ,[Plain [Str "item",Space,Str "two",Space,Str "and",Space,
->                   Str "a",Space,Link [Str "link"] ("/url","go to url")]]]]
+>                   Str "a",Space,Link nullAttr [Str "link"] ("/url","go to 
url")]]]]
 
 And of course, you can use Haskell to define your own builders:
 
@@ -117,12 +117,15 @@
                            , codeWith
                            , code
                            , space
+                           , softbreak
                            , linebreak
                            , math
                            , displayMath
                            , rawInline
                            , link
+                           , linkWith
                            , image
+                           , imageWith
                            , note
                            , spanWith
                            , trimInlines
@@ -203,6 +206,8 @@
       (xs' :> x, y :< ys') -> Many (meld `mappend` ys')
         where meld = case (x, y) of
                           (Space, Space)     -> xs' |> Space
+                          (Space, SoftBreak) -> xs' |> SoftBreak
+                          (SoftBreak, Space) -> xs' |> SoftBreak
                           (Str t1, Str t2)   -> xs' |> Str (t1 <> t2)
                           (Emph i1, Emph i2) -> xs' |> Emph (i1 <> i2)
                           (Strong i1, Strong i2) -> xs' |> Strong (i1 <> i2)
@@ -210,23 +215,30 @@
                           (Superscript i1, Superscript i2) -> xs' |> 
Superscript (i1 <> i2)
                           (Strikeout i1, Strikeout i2) -> xs' |> Strikeout (i1 
<> i2)
                           (Space, LineBreak) -> xs' |> LineBreak
+                          (LineBreak, Space) -> xs' |> LineBreak
+                          (SoftBreak, LineBreak) -> xs' |> LineBreak
+                          (LineBreak, SoftBreak) -> xs' |> LineBreak
+                          (SoftBreak, SoftBreak) -> xs' |> SoftBreak
                           _                  -> xs' |> x |> y
 
 instance IsString Inlines where
    fromString = text
 
--- | Trim leading and trailing Sp (spaces) from an Inlines.
+-- | Trim leading and trailing spaces and softbreaks from an Inlines.
 trimInlines :: Inlines -> Inlines
 #if MIN_VERSION_containers(0,4,0)
-trimInlines (Many ils) = Many $ Seq.dropWhileL (== Space) $
-                            Seq.dropWhileR (== Space) $ ils
+trimInlines (Many ils) = Many $ Seq.dropWhileL isSp $
+                            Seq.dropWhileR isSp $ ils
 #else
 -- for GHC 6.12, we need to workaround a bug in dropWhileR
 -- see http://hackage.haskell.org/trac/ghc/ticket/4157
-trimInlines (Many ils) = Many $ Seq.dropWhileL (== Space) $
-                            Seq.reverse $ Seq.dropWhileL (== Space) $
+trimInlines (Many ils) = Many $ Seq.dropWhileL isSp $
+                            Seq.reverse $ Seq.dropWhileL isSp $
                             Seq.reverse ils
 #endif
+  where isSp Space = True
+        isSp SoftBreak = True
+        isSp _ = False
 
 -- Document builders
 
@@ -279,19 +291,26 @@
 
 -- Inline list builders
 
--- | Convert a 'String' to 'Inlines', treating interword spaces as 'Space's.
--- If you want a 'Str' with literal spaces, use 'str'.
+-- | Convert a 'String' to 'Inlines', treating interword spaces as 'Space's
+-- or 'SoftBreak's.  If you want a 'Str' with literal spaces, use 'str'.
 text :: String -> Inlines
 text = fromList . map conv . breakBySpaces
   where breakBySpaces = groupBy sameCategory
         sameCategory x y = (is_space x && is_space y) ||
                            (not $ is_space x || is_space y)
-        conv xs | all is_space xs = Space
+        conv xs | all is_space xs =
+           if any is_newline xs
+              then SoftBreak
+              else Space
         conv xs = Str xs
-        is_space ' '  = True
-        is_space '\n' = True
-        is_space '\t' = True
-        is_space _    = False
+        is_space ' '    = True
+        is_space '\r'   = True
+        is_space '\n'   = True
+        is_space '\t'   = True
+        is_space _      = False
+        is_newline '\r' = True
+        is_newline '\n' = True
+        is_newline _    = False
 
 str :: String -> Inlines
 str = singleton . Str
@@ -337,6 +356,9 @@
 space :: Inlines
 space = singleton Space
 
+softbreak :: Inlines
+softbreak = singleton SoftBreak
+
 linebreak :: Inlines
 linebreak = singleton LineBreak
 
@@ -355,13 +377,27 @@
      -> String  -- ^ Title
      -> Inlines -- ^ Label
      -> Inlines
-link url title x = singleton $ Link (toList x) (url, title)
+link = linkWith nullAttr
+
+linkWith :: Attr    -- ^ Attributes
+         -> String  -- ^ URL
+         -> String  -- ^ Title
+         -> Inlines -- ^ Label
+         -> Inlines
+linkWith attr url title x = singleton $ Link attr (toList x) (url, title)
 
 image :: String  -- ^ URL
       -> String  -- ^ Title
       -> Inlines -- ^ Alt text
       -> Inlines
-image url title x = singleton $ Image (toList x) (url, title)
+image = imageWith nullAttr
+
+imageWith :: Attr -- ^ Attributes
+          -> String  -- ^ URL
+          -> String  -- ^ Title
+          -> Inlines -- ^ Alt text
+          -> Inlines
+imageWith attr url title x = singleton $ Image attr (toList x) (url, title)
 
 note :: Blocks -> Inlines
 note = singleton . Note . toList
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.12.4.7/Text/Pandoc/Definition.hs 
new/pandoc-types-1.16.0.1/Text/Pandoc/Definition.hs
--- old/pandoc-types-1.12.4.7/Text/Pandoc/Definition.hs 2015-09-23 
21:29:27.000000000 +0200
+++ new/pandoc-types-1.16.0.1/Text/Pandoc/Definition.hs 2016-01-06 
19:26:25.000000000 +0100
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, FlexibleContexts #-}
+{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, FlexibleContexts, CPP #-}
 
 {-
 Copyright (C) 2006-2013 John MacFarlane <[email protected]>
@@ -66,7 +66,11 @@
 import Data.String
 import Data.Char (toLower)
 import Data.Monoid
+#if MIN_VERSION_base(4,8,0)
+import Control.DeepSeq
+#else
 import Control.DeepSeq.Generics
+#endif
 
 data Pandoc = Pandoc Meta [Block]
               deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)
@@ -233,11 +237,12 @@
     | Cite [Citation]  [Inline] -- ^ Citation (list of inlines)
     | Code Attr String      -- ^ Inline code (literal)
     | Space                 -- ^ Inter-word space
+    | SoftBreak             -- ^ Soft line break
     | LineBreak             -- ^ Hard line break
     | Math MathType String  -- ^ TeX math (literal)
     | RawInline Format String -- ^ Raw inline
-    | Link [Inline] Target  -- ^ Hyperlink: text (list of inlines), target
-    | Image [Inline] Target -- ^ Image:  alt text (list of inlines), target
+    | Link Attr [Inline] Target  -- ^ Hyperlink: alt text (list of inlines), 
target
+    | Image Attr [Inline] Target -- ^ Image:  alt text (list of inlines), 
target
     | Note [Block]          -- ^ Footnote or endnote
     | Span Attr [Inline]    -- ^ Generic inline container with attributes
     deriving (Show, Eq, Ord, Read, Typeable, Data, Generic)
@@ -342,6 +347,21 @@
   where toJSON = toJSON'
 
 -- Instances for deepseq
+#if MIN_VERSION_base(4,8,0)
+instance NFData MetaValue
+instance NFData Meta
+instance NFData Citation
+instance NFData Alignment
+instance NFData Inline
+instance NFData MathType
+instance NFData Format
+instance NFData CitationMode
+instance NFData QuoteType
+instance NFData ListNumberDelim
+instance NFData ListNumberStyle
+instance NFData Block
+instance NFData Pandoc
+#else
 instance NFData MetaValue where rnf = genericRnf
 instance NFData Meta where rnf = genericRnf
 instance NFData Citation where rnf = genericRnf
@@ -355,3 +375,4 @@
 instance NFData ListNumberStyle where rnf = genericRnf
 instance NFData Block where rnf = genericRnf
 instance NFData Pandoc where rnf = genericRnf
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.12.4.7/Text/Pandoc/Generic.hs 
new/pandoc-types-1.16.0.1/Text/Pandoc/Generic.hs
--- old/pandoc-types-1.12.4.7/Text/Pandoc/Generic.hs    2015-09-23 
21:29:27.000000000 +0200
+++ new/pandoc-types-1.16.0.1/Text/Pandoc/Generic.hs    2016-01-06 
19:26:25.000000000 +0100
@@ -94,7 +94,7 @@
 
 > extractURL :: Inline -> [String]
 > extractURL (Link _ (u,_)) = [u]
-> extractURL (Image _ (u,_)) = [u]
+> extractURL (Image _ _ (u,_)) = [u]
 > extractURL _ = []
 >
 > extractURLs :: Pandoc -> [String]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.12.4.7/Text/Pandoc/Walk.hs 
new/pandoc-types-1.16.0.1/Text/Pandoc/Walk.hs
--- old/pandoc-types-1.12.4.7/Text/Pandoc/Walk.hs       2015-09-23 
21:29:27.000000000 +0200
+++ new/pandoc-types-1.16.0.1/Text/Pandoc/Walk.hs       2016-01-06 
19:26:25.000000000 +0100
@@ -1,5 +1,10 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, ScopedTypeVariables,
-    OverlappingInstances #-}
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, ScopedTypeVariables, 
CPP #-}
+#if MIN_VERSION_base(4,8,0)
+#define OVERLAPS {-# OVERLAPPING #-}
+#else
+{-# LANGUAGE OverlappingInstances #-}
+#define OVERLAPS
+#endif
 {-
 Copyright (C) 2013 John MacFarlane <[email protected]>
 
@@ -55,8 +60,8 @@
 linked to in a document:
 
 > extractURL :: Inline -> [String]
-> extractURL (Link _ (u,_)) = [u]
-> extractURL (Image _ (u,_)) = [u]
+> extractURL (Link _ _ (u,_)) = [u]
+> extractURL (Image _ _ (u,_)) = [u]
 > extractURL _ = []
 >
 > extractURLs :: Pandoc -> [String]
@@ -92,7 +97,8 @@
   walkM f = T.mapM (walkM f)
   query f = F.foldMap (query f)
 
-instance (Walkable a b, Walkable a c) => Walkable a (b,c) where
+instance OVERLAPS
+        (Walkable a b, Walkable a c) => Walkable a (b,c) where
   walk f (x,y)  = (walk f x, walk f y)
   walkM f (x,y) = do x' <- walkM f x
                      y' <- walkM f y
@@ -111,11 +117,12 @@
   walk f (Cite cs xs)     = f $ Cite (walk f cs) (walk f xs)
   walk f (Code attr s)    = f $ Code attr s
   walk f Space            = f Space
+  walk f SoftBreak        = f SoftBreak
   walk f LineBreak        = f LineBreak
   walk f (Math mt s)      = f (Math mt s)
   walk f (RawInline t s)  = f $ RawInline t s
-  walk f (Link xs t)      = f $ Link (walk f xs) t
-  walk f (Image xs t)     = f $ Image (walk f xs) t
+  walk f (Link atr xs t)  = f $ Link atr (walk f xs) t
+  walk f (Image atr xs t) = f $ Image atr (walk f xs) t
   walk f (Note bs)        = f $ Note (walk f bs)
   walk f (Span attr xs)   = f $ Span attr (walk f xs)
 
@@ -132,11 +139,12 @@
                                f $ Cite cs' xs'
   walkM f (Code attr s)   = f $ Code attr s
   walkM f Space           = f Space
+  walkM f SoftBreak       = f SoftBreak
   walkM f LineBreak       = f LineBreak
   walkM f (Math mt s)     = f (Math mt s)
   walkM f (RawInline t s) = f $ RawInline t s
-  walkM f (Link xs t)     = Link <$> walkM f xs >>= f . ($ t)
-  walkM f (Image xs t)    = Image <$> walkM f xs >>= f . ($ t)
+  walkM f (Link atr xs t) = Link atr <$> walkM f xs >>= f . ($ t)
+  walkM f (Image atr xs t)= Image atr <$> walkM f xs >>= f . ($ t)
   walkM f (Note bs)       = Note <$> walkM f bs >>= f
   walkM f (Span attr xs)  = Span attr <$> walkM f xs >>= f
 
@@ -151,11 +159,12 @@
   query f (Cite cs xs)    = f (Cite cs xs) <> query f cs <> query f xs
   query f (Code attr s)   = f (Code attr s)
   query f Space           = f Space
+  query f SoftBreak       = f SoftBreak
   query f LineBreak       = f LineBreak
   query f (Math mt s)     = f (Math mt s)
   query f (RawInline t s) = f (RawInline t s)
-  query f (Link xs t)     = f (Link xs t) <> query f xs
-  query f (Image xs t)    = f (Image xs t) <> query f xs
+  query f (Link atr xs t) = f (Link atr xs t) <> query f xs
+  query f (Image atr xs t)= f (Image atr xs t) <> query f xs
   query f (Note bs)       = f (Note bs) <> query f bs
   query f (Span attr xs)  = f (Span attr xs) <> query f xs
 
@@ -266,11 +275,12 @@
   walk f (Cite cs xs)    = Cite (walk f cs) (walk f xs)
   walk f (Code attr s)   = Code attr s
   walk f Space           = Space
+  walk f SoftBreak       = SoftBreak
   walk f LineBreak       = LineBreak
   walk f (Math mt s)     = Math mt s
   walk f (RawInline t s) = RawInline t s
-  walk f (Link xs t)     = Link (walk f xs) t
-  walk f (Image xs t)    = Image (walk f xs) t
+  walk f (Link atr xs t) = Link atr (walk f xs) t
+  walk f (Image atr xs t)= Image atr (walk f xs) t
   walk f (Note bs)       = Note (walk f bs)
   walk f (Span attr xs)  = Span attr (walk f xs)
 
@@ -287,11 +297,12 @@
                                return $ Cite cs' xs'
   walkM f (Code attr s)   = return $ Code attr s
   walkM f Space           = return $ Space
+  walkM f SoftBreak       = return $ SoftBreak
   walkM f LineBreak       = return $ LineBreak
   walkM f (Math mt s)     = return $ Math mt s
   walkM f (RawInline t s) = return $ RawInline t s
-  walkM f (Link xs t)     = (\lab -> Link lab t) <$> walkM f xs
-  walkM f (Image xs t)    = (\lab -> Image lab t) <$> walkM f xs
+  walkM f (Link atr xs t) = (\lab -> Link atr lab t) <$> walkM f xs
+  walkM f (Image atr xs t)= (\lab -> Image atr lab t) <$> walkM f xs
   walkM f (Note bs)       = Note <$> walkM f bs
   walkM f (Span attr xs)  = Span attr <$> walkM f xs
 
@@ -306,11 +317,12 @@
   query f (Cite cs xs)    = query f cs <> query f xs
   query f (Code attr s)   = mempty
   query f Space           = mempty
+  query f SoftBreak       = mempty
   query f LineBreak       = mempty
   query f (Math mt s)     = mempty
   query f (RawInline t s) = mempty
-  query f (Link xs t)     = query f xs
-  query f (Image xs t)    = query f xs
+  query f (Link atr xs t) = query f xs
+  query f (Image atr xs t)= query f xs
   query f (Note bs)       = query f bs
   query f (Span attr xs)  = query f xs
 
@@ -411,8 +423,3 @@
        return $ Citation id' pref' suff' mode notenum hash
   query f (Citation id' pref suff mode notenum hash) =
     query f pref <> query f suff
-
-instance Walkable a b => Walkable a [b] where
-  walk f xs  = map (walk f) xs
-  walkM f xs = mapM (walkM f) xs
-  query f xs = mconcat $ map (query f) xs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.12.4.7/changelog 
new/pandoc-types-1.16.0.1/changelog
--- old/pandoc-types-1.12.4.7/changelog 1970-01-01 01:00:00.000000000 +0100
+++ new/pandoc-types-1.16.0.1/changelog 2016-01-06 19:26:25.000000000 +0100
@@ -0,0 +1,4 @@
+[1.16]
+
+* Added Attr field to Image and Link.
+* Added SoftBreak constructor to Inline
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandoc-types-1.12.4.7/pandoc-types.cabal 
new/pandoc-types-1.16.0.1/pandoc-types.cabal
--- old/pandoc-types-1.12.4.7/pandoc-types.cabal        2015-09-23 
21:29:27.000000000 +0200
+++ new/pandoc-types-1.16.0.1/pandoc-types.cabal        2016-01-06 
19:26:25.000000000 +0100
@@ -1,5 +1,5 @@
 Name:                pandoc-types
-Version:             1.12.4.7
+Version:             1.16.0.1
 Synopsis:            Types for representing a structured document
 Description:         @Text.Pandoc.Definition@ defines the 'Pandoc' data
                      structure, which is used by pandoc to represent
@@ -32,9 +32,12 @@
 Category:            Text
 Build-type:          Simple
 Cabal-version:       >=1.6
+Tested-With:         GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2
+Extra-Source-Files:  changelog
 Source-repository    head
   type:              git
   location:          git://github.com/jgm/pandoc-types.git
+
 Library
   Exposed-modules:   Text.Pandoc.Definition
                      Text.Pandoc.Generic
@@ -46,5 +49,8 @@
                      syb >= 0.1 && < 0.7,
                      ghc-prim >= 0.2,
                      bytestring >= 0.9 && < 0.11,
-                     aeson >= 0.6.2 && < 0.11,
-                     deepseq-generics >= 0.1 && < 0.2
+                     aeson >= 0.6.2 && < 0.11
+  if impl(ghc < 7.10)
+    Build-depends:   deepseq-generics >= 0.1 && < 0.2
+  else
+    Build-depends:   deepseq >= 1.4.1 && < 1.5


Reply via email to