Hello community,
here is the log from the commit of package ghc-haddock-library for
openSUSE:Factory checked in at 2018-07-24 17:19:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-haddock-library (Old)
and /work/SRC/openSUSE:Factory/.ghc-haddock-library.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-haddock-library"
Tue Jul 24 17:19:10 2018 rev:8 rq:623780 version:1.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-haddock-library/ghc-haddock-library.changes
2018-05-30 12:25:49.177311838 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-haddock-library.new/ghc-haddock-library.changes
2018-07-24 17:19:12.923056031 +0200
@@ -1,0 +2,14 @@
+Wed Jul 18 14:26:26 UTC 2018 - [email protected]
+
+- Cosmetic: replace tabs with blanks, strip trailing white space,
+ and update copyright headers with spec-cleaner.
+
+-------------------------------------------------------------------
+Tue Jul 17 19:31:19 UTC 2018 - [email protected]
+
+- Update haddock-library to version 1.6.0.
+ ## Changes in version 1.6.0
+
+ * `MetaDoc` stores package name for since annotations
+
+-------------------------------------------------------------------
@@ -53 +66,0 @@
-
Old:
----
haddock-library-1.5.0.1.tar.gz
New:
----
haddock-library-1.6.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-haddock-library.spec ++++++
--- /var/tmp/diff_new_pack.zMD8Ui/_old 2018-07-24 17:19:13.527056807 +0200
+++ /var/tmp/diff_new_pack.zMD8Ui/_new 2018-07-24 17:19:13.531056812 +0200
@@ -20,7 +20,7 @@
%global has_internal_sub_libraries 1
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.5.0.1
+Version: 1.6.0
Release: 0
Summary: Library exposing some functionality of Haddock
License: BSD-3-Clause
++++++ haddock-library-1.5.0.1.tar.gz -> haddock-library-1.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haddock-library-1.5.0.1/CHANGES.md
new/haddock-library-1.6.0/CHANGES.md
--- old/haddock-library-1.5.0.1/CHANGES.md 2018-03-08 10:53:20.000000000
+0100
+++ new/haddock-library-1.6.0/CHANGES.md 2018-05-19 10:06:30.000000000
+0200
@@ -1,3 +1,7 @@
+## Changes in version 1.6.0
+
+ * `MetaDoc` stores package name for since annotations
+
## Changes in version 1.5.0.1
* Support for parsing unicode operators (#458)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haddock-library-1.5.0.1/fixtures/Fixtures.hs
new/haddock-library-1.6.0/fixtures/Fixtures.hs
--- old/haddock-library-1.5.0.1/fixtures/Fixtures.hs 2018-03-08
10:53:20.000000000 +0100
+++ new/haddock-library-1.6.0/fixtures/Fixtures.hs 2018-05-19
10:06:29.000000000 +0200
@@ -14,6 +14,7 @@
import System.Directory (getDirectoryContents)
import System.Exit (exitFailure)
import System.FilePath
+import System.IO
import Data.TreeDiff
import Data.TreeDiff.Golden
@@ -65,7 +66,7 @@
case mres of
Nothing -> return (Result 1 1)
Just str -> do
- putStr str
+ putStrLn str
return (Result 0 1)
where
handler :: Expr -> IOException -> IO Expr
@@ -101,12 +102,14 @@
writeFile o actual
parseString :: String -> Doc String
-parseString = Parse.toRegular . _doc . Parse.parseParas
+parseString = Parse.toRegular . _doc . Parse.parseParas Nothing
data Cmd = CmdRun | CmdAccept | CmdList
main :: IO ()
-main = runCmd =<< O.execParser opts
+main = do
+ hSetBuffering stdout NoBuffering -- For interleaved output when debugging
+ runCmd =<< O.execParser opts
where
opts = O.info (O.helper <*> cmdParser) O.fullDesc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haddock-library-1.5.0.1/haddock-library.cabal
new/haddock-library-1.6.0/haddock-library.cabal
--- old/haddock-library-1.5.0.1/haddock-library.cabal 2018-03-08
10:53:20.000000000 +0100
+++ new/haddock-library-1.6.0/haddock-library.cabal 2018-05-19
10:06:29.000000000 +0200
@@ -1,6 +1,6 @@
cabal-version: 2.0
name: haddock-library
-version: 1.5.0.1
+version: 1.6.0
synopsis: Library exposing some functionality of Haddock.
description: Haddock is a documentation-generation tool for Haskell
libraries. These modules expose some functionality of it
@@ -32,7 +32,6 @@
build-depends: attoparsec
hs-source-dirs: src
- ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2
exposed-modules:
Documentation.Haddock.Doc
@@ -45,7 +44,7 @@
other-modules:
Documentation.Haddock.Parser.Util
- ghc-options: -Wall
+ ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2
if impl(ghc >= 8.0)
ghc-options: -Wcompat -Wnoncanonical-monad-instances
-Wnoncanonical-monadfail-instances
@@ -76,9 +75,7 @@
Data.Attoparsec.Internal.Types
Data.Attoparsec.Number
- ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2
-
- ghc-options: -Wall
+ ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2
if impl(ghc >= 8.0)
ghc-options: -Wcompat -Wnoncanonical-monad-instances
-Wnoncanonical-monadfail-instances
else
@@ -132,7 +129,7 @@
type: exitcode-stdio-1.0
default-language: Haskell2010
main-is: Fixtures.hs
- ghc-options: -Wall
+ ghc-options: -Wall -O0
hs-source-dirs: fixtures
build-depends:
base-compat ^>= 0.9.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.5.0.1/src/Documentation/Haddock/Doc.hs
new/haddock-library-1.6.0/src/Documentation/Haddock/Doc.hs
--- old/haddock-library-1.5.0.1/src/Documentation/Haddock/Doc.hs
2018-03-08 10:53:20.000000000 +0100
+++ new/haddock-library-1.6.0/src/Documentation/Haddock/Doc.hs 2018-05-19
10:06:29.000000000 +0200
@@ -27,16 +27,16 @@
(MetaDoc { _meta = m', _doc = d' }) =
MetaDoc { _meta = m' `metaAppend` m, _doc = d `docAppend` d' }
--- | This is not a monoidal append, it uses '<|>' for the '_version'.
+-- | This is not a monoidal append, it uses '<|>' for the '_version' and
+-- '_package'.
metaAppend :: Meta -> Meta -> Meta
-metaAppend (Meta { _version = v }) (Meta { _version = v' }) =
- Meta { _version = v <|> v' }
+metaAppend (Meta v1 p1) (Meta v2 p2) = Meta (v1 <|> v2) (p1 <|> p2)
emptyMetaDoc :: MetaDoc mod id
emptyMetaDoc = MetaDoc { _meta = emptyMeta, _doc = DocEmpty }
emptyMeta :: Meta
-emptyMeta = Meta { _version = empty }
+emptyMeta = Meta empty empty
docAppend :: DocH mod id -> DocH mod id -> DocH mod id
docAppend (DocDefList ds1) (DocDefList ds2) = DocDefList (ds1++ds2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.5.0.1/src/Documentation/Haddock/Parser.hs
new/haddock-library-1.6.0/src/Documentation/Haddock/Parser.hs
--- old/haddock-library-1.5.0.1/src/Documentation/Haddock/Parser.hs
2018-03-08 10:53:20.000000000 +0100
+++ new/haddock-library-1.6.0/src/Documentation/Haddock/Parser.hs
2018-05-19 10:06:29.000000000 +0200
@@ -116,10 +116,13 @@
-- | Main entry point to the parser. Appends the newline character
-- to the input string.
-parseParas :: String -- ^ String to parse
+parseParas :: Maybe Package
+ -> String -- ^ String to parse
-> MetaDoc mod Identifier
-parseParas input = case parseParasState input of
- (state, a) -> MetaDoc { _meta = Meta { _version = parserStateSince state }
+parseParas pkg input = case parseParasState input of
+ (state, a) -> MetaDoc { _meta = Meta { _version = parserStateSince state
+ , _package = pkg
+ }
, _doc = a
}
@@ -742,10 +745,12 @@
| otherwise = Just $ c == '\n'
hyperlink :: Parser (DocH mod a)
-hyperlink = DocHyperlink . makeLabeled Hyperlink . decodeUtf8
- <$> disallowNewline ("<" *> takeUntil ">")
- <|> autoUrl
- <|> markdownLink
+hyperlink = angleBracketLink <|> markdownLink <|> autoUrl
+
+angleBracketLink :: Parser (DocH mod a)
+angleBracketLink =
+ DocHyperlink . makeLabeled Hyperlink . decodeUtf8
+ <$> disallowNewline ("<" *> takeUntil ">")
markdownLink :: Parser (DocH mod a)
markdownLink = DocHyperlink <$> linkParser
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.5.0.1/src/Documentation/Haddock/Types.hs
new/haddock-library-1.6.0/src/Documentation/Haddock/Types.hs
--- old/haddock-library-1.5.0.1/src/Documentation/Haddock/Types.hs
2018-03-08 10:53:20.000000000 +0100
+++ new/haddock-library-1.6.0/src/Documentation/Haddock/Types.hs
2018-05-19 10:06:29.000000000 +0200
@@ -34,7 +34,9 @@
-- meta-data to comments. We make a structure for this ahead of time
-- so we don't have to gut half the core each time we want to add such
-- info.
-newtype Meta = Meta { _version :: Maybe Version } deriving (Eq, Show)
+data Meta = Meta { _version :: Maybe Version
+ , _package :: Maybe Package
+ } deriving (Eq, Show)
data MetaDoc mod id =
MetaDoc { _meta :: Meta
@@ -61,6 +63,7 @@
overDocF f d = (\x -> d { _doc = x }) <$> f (_doc d)
type Version = [Int]
+type Package = String
data Hyperlink = Hyperlink
{ hyperlinkUrl :: String
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.5.0.1/test/Documentation/Haddock/ParserSpec.hs
new/haddock-library-1.6.0/test/Documentation/Haddock/ParserSpec.hs
--- old/haddock-library-1.5.0.1/test/Documentation/Haddock/ParserSpec.hs
2018-03-08 10:53:20.000000000 +0100
+++ new/haddock-library-1.6.0/test/Documentation/Haddock/ParserSpec.hs
2018-05-19 10:06:29.000000000 +0200
@@ -24,8 +24,15 @@
instance IsString a => IsString (Maybe a) where
fromString = Just . fromString
+emptyMeta :: Meta
+emptyMeta =
+ Meta {
+ _version = Nothing
+ , _package = Nothing
+ }
+
parseParas :: String -> MetaDoc () String
-parseParas = overDoc Parse.toRegular . Parse.parseParas
+parseParas = overDoc Parse.toRegular . Parse.parseParas Nothing
parseString :: String -> Doc String
parseString = Parse.toRegular . Parse.parseString
@@ -375,17 +382,17 @@
context "when parsing @since" $ do
it "adds specified version to the result" $ do
parseParas "@since 0.5.0" `shouldBe`
- MetaDoc { _meta = Meta { _version = Just [0,5,0] }
+ MetaDoc { _meta = emptyMeta { _version = Just [0,5,0] }
, _doc = DocEmpty }
it "ignores trailing whitespace" $ do
parseParas "@since 0.5.0 \t " `shouldBe`
- MetaDoc { _meta = Meta { _version = Just [0,5,0] }
+ MetaDoc { _meta = emptyMeta { _version = Just [0,5,0] }
, _doc = DocEmpty }
it "does not allow trailing input" $ do
parseParas "@since 0.5.0 foo" `shouldBe`
- MetaDoc { _meta = Meta { _version = Nothing }
+ MetaDoc { _meta = emptyMeta { _version = Nothing }
, _doc = DocParagraph "@since 0.5.0 foo" }
@@ -395,7 +402,7 @@
"@since 0.5.0"
, "@since 0.6.0"
, "@since 0.7.0"
- ] `shouldBe` MetaDoc { _meta = Meta { _version = Just [0,7,0] }
+ ] `shouldBe` MetaDoc { _meta = emptyMeta { _version = Just [0,7,0]
}
, _doc = DocEmpty }