Hello community,
here is the log from the commit of package ghc-haddock-library for
openSUSE:Factory checked in at 2016-10-19 13:04:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-haddock-library (Old)
and /work/SRC/openSUSE:Factory/.ghc-haddock-library.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-haddock-library"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-haddock-library/ghc-haddock-library.changes
2016-07-20 09:21:49.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-haddock-library.new/ghc-haddock-library.changes
2016-10-19 13:04:22.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Sep 15 06:51:07 UTC 2016 - [email protected]
+
+- Update to version 1.4.2 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
haddock-library-1.2.1.tar.gz
New:
----
haddock-library-1.4.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-haddock-library.spec ++++++
--- /var/tmp/diff_new_pack.KEvYlB/_old 2016-10-19 13:04:23.000000000 +0200
+++ /var/tmp/diff_new_pack.KEvYlB/_new 2016-10-19 13:04:23.000000000 +0200
@@ -19,15 +19,14 @@
%global pkg_name haddock-library
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.2.1
+Version: 1.4.2
Release: 0
Summary: Library exposing some functionality of Haddock
License: BSD-3-Clause
-Group: System/Libraries
+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
BuildRequires: ghc-Cabal-devel
-# Begin cabal-rpm deps:
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-rpm-macros
@@ -38,7 +37,6 @@
BuildRequires: ghc-base-compat-devel
BuildRequires: ghc-hspec-devel
%endif
-# End cabal-rpm deps
%description
Haddock is a documentation-generation tool for Haskell libraries.
@@ -62,20 +60,14 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
%check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
%post devel
%ghc_pkg_recache
++++++ haddock-library-1.2.1.tar.gz -> haddock-library-1.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haddock-library-1.2.1/LICENSE
new/haddock-library-1.4.2/LICENSE
--- old/haddock-library-1.2.1/LICENSE 2015-07-22 22:54:39.000000000 +0200
+++ new/haddock-library-1.4.2/LICENSE 2016-06-02 00:09:04.000000000 +0200
@@ -5,11 +5,11 @@
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haddock-library-1.2.1/haddock-library.cabal
new/haddock-library-1.4.2/haddock-library.cabal
--- old/haddock-library-1.2.1/haddock-library.cabal 2015-07-22
22:54:39.000000000 +0200
+++ new/haddock-library-1.4.2/haddock-library.cabal 2016-06-04
00:06:24.000000000 +0200
@@ -1,5 +1,5 @@
name: haddock-library
-version: 1.2.1
+version: 1.4.2
synopsis: Library exposing some functionality of Haddock.
description: Haddock is a documentation-generation tool for Haskell
libraries. These modules expose some functionality of it
@@ -21,7 +21,7 @@
default-language: Haskell2010
build-depends:
- base >= 4.5 && < 4.9
+ base >= 4.5 && < 4.10
, bytestring
, transformers
, deepseq
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.2.1/src/Documentation/Haddock/Parser/Monad.hs
new/haddock-library-1.4.2/src/Documentation/Haddock/Parser/Monad.hs
--- old/haddock-library-1.2.1/src/Documentation/Haddock/Parser/Monad.hs
2015-07-22 22:54:39.000000000 +0200
+++ new/haddock-library-1.4.2/src/Documentation/Haddock/Parser/Monad.hs
2016-06-03 23:54:24.000000000 +0200
@@ -42,7 +42,7 @@
import Documentation.Haddock.Types (Version)
-data ParserState = ParserState {
+newtype ParserState = ParserState {
parserStateSince :: Maybe Version
} deriving (Eq, Show)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.2.1/src/Documentation/Haddock/Parser.hs
new/haddock-library-1.4.2/src/Documentation/Haddock/Parser.hs
--- old/haddock-library-1.2.1/src/Documentation/Haddock/Parser.hs
2015-07-22 22:54:39.000000000 +0200
+++ new/haddock-library-1.4.2/src/Documentation/Haddock/Parser.hs
2016-06-02 00:09:04.000000000 +0200
@@ -73,6 +73,8 @@
g (DocCodeBlock x) = DocCodeBlock $ g x
g (DocHyperlink x) = DocHyperlink x
g (DocPic x) = DocPic x
+ g (DocMathInline x) = DocMathInline x
+ g (DocMathDisplay x) = DocMathDisplay x
g (DocAName x) = DocAName x
g (DocProperty x) = DocProperty x
g (DocExamples x) = DocExamples x
@@ -113,7 +115,9 @@
where
p :: Parser (DocH mod Identifier)
p = docConcat <$> many (monospace <|> anchor <|> identifier <|> moduleName
- <|> picture <|> markdownImage <|> hyperlink <|>
bold
+ <|> picture <|> mathDisplay <|> mathInline
+ <|> markdownImage
+ <|> hyperlink <|> bold
<|> emphasis <|> encodedChar <|> string'
<|> skipSpecialChar)
@@ -224,6 +228,22 @@
picture = DocPic . makeLabeled Picture . decodeUtf8
<$> disallowNewline ("<<" *> takeUntil ">>")
+-- | Inline math parser, surrounded by \\( and \\).
+--
+-- >>> parseString "\\(\\int_{-\\infty}^{\\infty} e^{-x^2/2} =
\\sqrt{2\\pi}\\)"
+-- DocMathInline "\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}"
+mathInline :: Parser (DocH mod a)
+mathInline = DocMathInline . decodeUtf8
+ <$> disallowNewline ("\\(" *> takeUntil "\\)")
+
+-- | Display math parser, surrounded by \\[ and \\].
+--
+-- >>> parseString "\\[\\int_{-\\infty}^{\\infty} e^{-x^2/2} =
\\sqrt{2\\pi}\\]"
+-- DocMathDisplay "\\int_{-\\infty}^{\\infty} e^{-x^2/2} = \\sqrt{2\\pi}"
+mathDisplay :: Parser (DocH mod a)
+mathDisplay = DocMathDisplay . decodeUtf8
+ <$> ("\\[" *> takeUntil "\\]")
+
markdownImage :: Parser (DocH mod a)
markdownImage = fromHyperlink <$> ("!" *> linkParser)
where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.2.1/src/Documentation/Haddock/Types.hs
new/haddock-library-1.4.2/src/Documentation/Haddock/Types.hs
--- old/haddock-library-1.2.1/src/Documentation/Haddock/Types.hs
2015-07-22 22:54:39.000000000 +0200
+++ new/haddock-library-1.4.2/src/Documentation/Haddock/Types.hs
2016-06-02 00:09:04.000000000 +0200
@@ -71,6 +71,8 @@
| DocCodeBlock (DocH mod id)
| DocHyperlink Hyperlink
| DocPic Picture
+ | DocMathInline String
+ | DocMathDisplay String
| DocAName String
| DocProperty String
| DocExamples [Example]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.2.1/test/Documentation/Haddock/ParserSpec.hs
new/haddock-library-1.4.2/test/Documentation/Haddock/ParserSpec.hs
--- old/haddock-library-1.2.1/test/Documentation/Haddock/ParserSpec.hs
2015-07-22 22:54:39.000000000 +0200
+++ new/haddock-library-1.4.2/test/Documentation/Haddock/ParserSpec.hs
2016-06-02 00:09:04.000000000 +0200
@@ -208,6 +208,10 @@
it "supports title for deprecated picture syntax" $ do
"<<b a z>>" `shouldParseTo` image "b" "a z"
+ context "when parsing display math" $ do
+
+ it "accepts markdown syntax for display math containing newlines" $ do
+ "\\[\\pi\n\\pi\\]" `shouldParseTo` DocMathDisplay "\\pi\n\\pi"
context "when parsing anchors" $ do
it "parses a single word anchor" $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.2.1/vendor/attoparsec-0.12.1.1/Data/Attoparsec/Internal/Types.hs
new/haddock-library-1.4.2/vendor/attoparsec-0.12.1.1/Data/Attoparsec/Internal/Types.hs
---
old/haddock-library-1.2.1/vendor/attoparsec-0.12.1.1/Data/Attoparsec/Internal/Types.hs
2015-07-22 22:54:39.000000000 +0200
+++
new/haddock-library-1.4.2/vendor/attoparsec-0.12.1.1/Data/Attoparsec/Internal/Types.hs
2016-06-02 00:09:04.000000000 +0200
@@ -126,7 +126,7 @@
where msg = "Failed reading: " ++ err
{-# INLINE fail #-}
- return v = Parser $ \t pos more _lose succ -> succ t pos more v
+ return = pure
{-# INLINE return #-}
m >>= k = Parser $ \t !pos more lose succ ->
@@ -158,7 +158,7 @@
{-# INLINE apP #-}
instance Applicative (Parser i) where
- pure = return
+ pure v = Parser $ \t pos more _lose succ -> succ t pos more v
{-# INLINE pure #-}
(<*>) = apP
{-# INLINE (<*>) #-}
@@ -166,7 +166,7 @@
-- These definitions are equal to the defaults, but this
-- way the optimizer doesn't have to work so hard to figure
-- that out.
- (*>) = (>>)
+ m *> k = m >>= \_ -> k
{-# INLINE (*>) #-}
x <* y = x >>= \a -> y >> return a
{-# INLINE (<*) #-}