Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-haddock-library for
openSUSE:Factory checked in at 2023-04-04 21:20:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-haddock-library (Old)
and /work/SRC/openSUSE:Factory/.ghc-haddock-library.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-haddock-library"
Tue Apr 4 21:20:13 2023 rev:19 rq:1075889 version:1.11.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-haddock-library/ghc-haddock-library.changes
2022-08-01 21:28:48.881383756 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-haddock-library.new.19717/ghc-haddock-library.changes
2023-04-04 21:20:28.277209865 +0200
@@ -1,0 +2,14 @@
+Thu Mar 30 17:06:55 UTC 2023 - Peter Simons <[email protected]>
+
+- Updated spec file to conform with ghc-rpm-macros-2.5.2.
+
+-------------------------------------------------------------------
+Sat Sep 24 14:14:21 UTC 2022 - Peter Simons <[email protected]>
+
+- Update haddock-library to version 1.11.0 revision 1.
+ Upstream has edited the change log file since the last release in
+ a non-trivial way, i.e. they did more than just add a new entry
+ at the top. You can review the file at:
+ http://hackage.haskell.org/package/haddock-library-1.11.0/src/CHANGES.md
+
+-------------------------------------------------------------------
Old:
----
haddock-library-1.10.0.tar.gz
New:
----
haddock-library-1.11.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-haddock-library.spec ++++++
--- /var/tmp/diff_new_pack.4ImZFb/_old 2023-04-04 21:20:29.101215118 +0200
+++ /var/tmp/diff_new_pack.4ImZFb/_new 2023-04-04 21:20:29.129215297 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-haddock-library
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,32 +17,44 @@
%global pkg_name haddock-library
+%global pkgver %{pkg_name}-%{version}
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.10.0
+Version: 1.11.0
Release: 0
Summary: Library exposing some functionality of Haddock
License: BSD-2-Clause
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal#/%{pkg_name}.cabal
+Source1:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
BuildRequires: ghc-Cabal-devel
-BuildRequires: ghc-bytestring-devel
+BuildRequires: ghc-base-devel
+BuildRequires: ghc-base-prof
BuildRequires: ghc-containers-devel
+BuildRequires: ghc-containers-prof
BuildRequires: ghc-parsec-devel
+BuildRequires: ghc-parsec-prof
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-text-devel
-BuildRequires: ghc-transformers-devel
+BuildRequires: ghc-text-prof
ExcludeArch: %{ix86}
%if %{with tests}
BuildRequires: ghc-QuickCheck-devel
+BuildRequires: ghc-QuickCheck-prof
BuildRequires: ghc-base-compat-devel
+BuildRequires: ghc-base-compat-prof
BuildRequires: ghc-deepseq-devel
+BuildRequires: ghc-deepseq-prof
BuildRequires: ghc-directory-devel
+BuildRequires: ghc-directory-prof
BuildRequires: ghc-filepath-devel
+BuildRequires: ghc-filepath-prof
BuildRequires: ghc-hspec-devel
+BuildRequires: ghc-hspec-prof
BuildRequires: ghc-optparse-applicative-devel
+BuildRequires: ghc-optparse-applicative-prof
BuildRequires: ghc-tree-diff-devel
+BuildRequires: ghc-tree-diff-prof
%endif
%description
@@ -63,6 +75,22 @@
This package provides the Haskell %{pkg_name} library development
files.
+%package -n ghc-%{pkg_name}-doc
+Summary: Haskell %{pkg_name} library documentation
+Requires: ghc-filesystem
+BuildArch: noarch
+
+%description -n ghc-%{pkg_name}-doc
+This package provides the Haskell %{pkg_name} library documentation.
+
+%package -n ghc-%{pkg_name}-prof
+Summary: Haskell %{pkg_name} profiling library
+Requires: ghc-%{pkg_name}-devel = %{version}-%{release}
+Supplements: (ghc-%{pkg_name}-devel and ghc-prof)
+
+%description -n ghc-%{pkg_name}-prof
+This package provides the Haskell %{pkg_name} profiling library.
+
%prep
%autosetup -n %{pkg_name}-%{version}
cp -p %{SOURCE1} %{pkg_name}.cabal
@@ -88,4 +116,9 @@
%files devel -f %{name}-devel.files
%doc CHANGES.md
+%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
+%license LICENSE
+
+%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+
%changelog
++++++ haddock-library-1.10.0.tar.gz -> haddock-library-1.11.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haddock-library-1.10.0/CHANGES.md
new/haddock-library-1.11.0/CHANGES.md
--- old/haddock-library-1.10.0/CHANGES.md 2001-09-09 03:46:40.000000000
+0200
+++ new/haddock-library-1.11.0/CHANGES.md 2001-09-09 03:46:40.000000000
+0200
@@ -1,7 +1,10 @@
-## Changes in version 1.10.0
+## Changes in version 1.11.0
+
+ * Add support for linking identifiers with a quote between backticks (#1408)
- * Add support for labeled module references (#1319, #1315)
+## Changes in version 1.10.0
+ * Add support for labeled module references (#1360)
## Changes in version 1.9.0
* Fix build-time regression for `base < 4.7` (#1119)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haddock-library-1.10.0/fixtures/Fixtures.hs
new/haddock-library-1.11.0/fixtures/Fixtures.hs
--- old/haddock-library-1.10.0/fixtures/Fixtures.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/fixtures/Fixtures.hs 2001-09-09
03:46:40.000000000 +0200
@@ -9,8 +9,7 @@
import Data.List (foldl')
import Data.Traversable (for)
import GHC.Generics (Generic)
-import Prelude ()
-import Prelude.Compat
+import Prelude
import System.Directory (getDirectoryContents)
import System.Exit (exitFailure)
import System.FilePath
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.10.0/fixtures/examples/linkInlineMarkup.parsed
new/haddock-library-1.11.0/fixtures/examples/linkInlineMarkup.parsed
--- old/haddock-library-1.10.0/fixtures/examples/linkInlineMarkup.parsed
2001-09-09 03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/fixtures/examples/linkInlineMarkup.parsed
2001-09-09 03:46:40.000000000 +0200
@@ -3,7 +3,6 @@
(DocString "Bla ")
(DocHyperlink
Hyperlink
- {hyperlinkLabel = Just
- (DocAppend
- (DocString "link ") (DocEmphasis (DocString
"emphasized"))),
+ {hyperlinkLabel = Just (DocAppend (DocString "link ")
+ (DocEmphasis (DocString
"emphasized"))),
hyperlinkUrl = "http://example.com"}))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haddock-library-1.10.0/haddock-library.cabal
new/haddock-library-1.11.0/haddock-library.cabal
--- old/haddock-library-1.10.0/haddock-library.cabal 2001-09-09
03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/haddock-library.cabal 2001-09-09
03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
-cabal-version: 2.2
+cabal-version: 3.0
name: haddock-library
-version: 1.10.0
+version: 1.11.0
synopsis: Library exposing some functionality of Haddock.
description: Haddock is a documentation-generation tool for Haskell
@@ -28,6 +28,7 @@
, GHC == 8.8.3
, GHC == 8.10.1
, GHC == 9.0.1
+ , GHC == 9.2.0
extra-source-files:
CHANGES.md
@@ -38,11 +39,9 @@
default-language: Haskell2010
build-depends:
- , base >= 4.5 && < 4.16
- , bytestring ^>= 0.9.2.1 || ^>= 0.10.0.0
+ , base >= 4.5 && < 4.17
, containers ^>= 0.4.2.1 || ^>= 0.5.0.0 || ^>= 0.6.0.1
- , transformers ^>= 0.3.0.0 || ^>= 0.4.1.0 || ^>= 0.5.0.0
- , text ^>= 1.2.3.0
+ , text ^>= 1.2.3.0 || ^>= 2.0
, parsec ^>= 3.1.13.0
ghc-options: -funbox-strict-fields -Wall
@@ -87,7 +86,7 @@
Documentation.Haddock.Parser.Identifier
build-depends:
- , base-compat ^>= 0.9.3 || ^>= 0.11.0
+ , base-compat ^>= 0.12.0
, QuickCheck ^>= 2.11 || ^>= 2.13.2 || ^>= 2.14
, deepseq ^>= 1.3.0.0 || ^>= 1.4.0.0
@@ -96,10 +95,10 @@
-- version of `hspec` & `hspec-discover` to ensure
-- intercompatibility
build-depends:
- , hspec >= 2.4.4 && < 2.8
+ , hspec >= 2.4.4 && < 2.10
build-tool-depends:
- , hspec-discover:hspec-discover >= 2.4.4 && < 2.8
+ , hspec-discover:hspec-discover >= 2.4.4 && < 2.10
test-suite fixtures
type: exitcode-stdio-1.0
@@ -114,11 +113,11 @@
, base
-- extra dependencies
- , base-compat ^>= 0.9.3 || ^>= 0.11.0
+ , base-compat ^>= 0.12.0
, directory ^>= 1.3.0.2
, filepath ^>= 1.4.1.2
, optparse-applicative ^>= 0.15
- , tree-diff ^>= 0.1
+ , tree-diff ^>= 0.2
source-repository head
type: git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/haddock-library-1.10.0/src/CompatPrelude.hs
new/haddock-library-1.11.0/src/CompatPrelude.hs
--- old/haddock-library-1.10.0/src/CompatPrelude.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/src/CompatPrelude.hs 2001-09-09
03:46:40.000000000 +0200
@@ -1,6 +1,7 @@
{-# LANGUAGE CPP #-}
-#if !MIN_VERSION_base(4,5,0)
+#ifdef __HLINT__
+#elif !MIN_VERSION_base(4,5,0)
# error This module doesn't provide compat-shims for versions prior to base-4.5
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.10.0/src/Documentation/Haddock/Markup.hs
new/haddock-library-1.11.0/src/Documentation/Haddock/Markup.hs
--- old/haddock-library-1.10.0/src/Documentation/Haddock/Markup.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/src/Documentation/Haddock/Markup.hs
2001-09-09 03:46:40.000000000 +0200
@@ -22,7 +22,7 @@
markup m (DocBold d) = markupBold m (markup m d)
markup m (DocMonospaced d) = markupMonospaced m (markup m d)
markup m (DocUnorderedList ds) = markupUnorderedList m (map (markup
m) ds)
-markup m (DocOrderedList ds) = markupOrderedList m (map (markup m)
ds)
+markup m (DocOrderedList ds) = markupOrderedList m (map (\(index,
a) -> (index, markup m a)) ds)
markup m (DocDefList ds) = markupDefList m (map (markupPair m)
ds)
markup m (DocCodeBlock d) = markupCodeBlock m (markup m d)
markup m (DocHyperlink (Hyperlink u l)) = markupHyperlink m (Hyperlink u (fmap
(markup m) l))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.10.0/src/Documentation/Haddock/Parser/Identifier.hs
new/haddock-library-1.11.0/src/Documentation/Haddock/Parser/Identifier.hs
--- old/haddock-library-1.10.0/src/Documentation/Haddock/Parser/Identifier.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/src/Documentation/Haddock/Parser/Identifier.hs
2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,4 @@
{-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE ViewPatterns #-}
-- |
-- Module : Documentation.Haddock.Parser.Identifier
-- Copyright : (c) Alec Theriault 2019,
@@ -150,9 +149,9 @@
| otherwise = Nothing
-- | Parse all but the last quote off the front of the input
- -- PRECONDITION: T.head t == '\''
+ -- PRECONDITION: T.head t `elem` ['\'', '`']
quotes :: Text -> (Int, Text)
- quotes t = let !n = T.length (T.takeWhile (== '\'') t) - 1
+ quotes t = let !n = T.length (T.takeWhile (`elem` ['\'', '`']) t) - 1
in (n, T.drop n t)
-- | Parse an operator off the front of the input
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.10.0/src/Documentation/Haddock/Parser/Monad.hs
new/haddock-library-1.11.0/src/Documentation/Haddock/Parser/Monad.hs
--- old/haddock-library-1.10.0/src/Documentation/Haddock/Parser/Monad.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/src/Documentation/Haddock/Parser/Monad.hs
2001-09-09 03:46:40.000000000 +0200
@@ -1,9 +1,8 @@
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE TypeSynonymInstances #-}
-- |
-- Module : Documentation.Haddock.Parser.Monad
-- Copyright : (c) Alec Theriault 2018-2019,
@@ -40,7 +39,7 @@
import Prelude hiding (takeWhile)
import CompatPrelude
--- | The only bit of information we really care about truding along with us
+-- | The only bit of information we really care about trudging along with us
-- through parsing is the version attached to a @\@since@ annotation - if
-- the doc even contained one.
newtype ParserState = ParserState {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.10.0/src/Documentation/Haddock/Parser.hs
new/haddock-library-1.11.0/src/Documentation/Haddock/Parser.hs
--- old/haddock-library-1.10.0/src/Documentation/Haddock/Parser.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/src/Documentation/Haddock/Parser.hs
2001-09-09 03:46:40.000000000 +0200
@@ -78,7 +78,7 @@
g (DocMonospaced x) = DocMonospaced $ g x
g (DocBold x) = DocBold $ g x
g (DocUnorderedList x) = DocUnorderedList $ fmap g x
- g (DocOrderedList x) = DocOrderedList $ fmap g x
+ g (DocOrderedList x) = DocOrderedList $ fmap (\(index, a) -> (index, g a))
x
g (DocDefList x) = DocDefList $ fmap (\(y, z) -> (g y, g z)) x
g (DocCodeBlock x) = DocCodeBlock $ g x
g (DocHyperlink (Hyperlink u x)) = DocHyperlink (Hyperlink u (fmap g x))
@@ -173,11 +173,11 @@
-- Once we have checked for any of these and tried to parse the
-- relevant markup, we can assume they are used as regular text.
specialChar :: [Char]
-specialChar = "_/<@\"&'`# "
+specialChar = "_/<@\"&'`#[ "
-- | Plain, regular parser for text. Called as one of the last parsers
-- to ensure that we have already given a chance to more meaningful parsers
--- before capturing their characers.
+-- before capturing their characters.
string' :: Parser (DocH mod a)
string' = DocString . unescape . T.unpack <$> takeWhile1_ (`notElem`
specialChar)
where
@@ -361,7 +361,7 @@
firstRow <- parseFirstRow
let len = T.length firstRow
- -- then we parse all consequtive rows starting and ending with + or |,
+ -- then we parse all consecutive rows starting and ending with + or |,
-- of the width `len`.
restRows <- many (try (parseRestRows len))
@@ -577,10 +577,24 @@
orderedList :: Text -> Parser (DocH mod Identifier)
orderedList indent = DocOrderedList <$> p
where
- p = (paren <|> dot) *> innerList indent p
+ p = do
+ index <- paren <|> dot
+ innerList' indent p index
dot = (decimal :: Parser Int) <* "."
paren = "(" *> decimal <* ")"
+-- | Like 'innerList' but takes the parsed index of the list item
+innerList' :: Text -> Parser [(Int, DocH mod Identifier)]
+ -> Int
+ -> Parser [(Int, DocH mod Identifier)]
+innerList' indent item index = do
+ c <- takeLine
+ (cs, items) <- more indent item
+ let contents = docParagraph . parseText . dropNLs . T.unlines $ c : cs
+ return $ case items of
+ Left p -> [(index, contents `docAppend` p)]
+ Right i -> (index, contents) : i
+
-- | Generic function collecting any further lines belonging to the
-- list entry and recursively collecting any further lists in the
-- same paragraph. Usually used as
@@ -710,7 +724,7 @@
Just (' ',t') -> Just t'
_ -> Nothing
--- | Parses examples. Examples are a paragraph level entitity (separated by an
empty line).
+-- | Parses examples. Examples are a paragraph level entity (separated by an
empty line).
-- Consecutive examples are accepted.
examples :: Parser (DocH mod a)
examples = DocExamples <$> (many (try (skipHorizontalSpace *> "\n")) *> go)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.10.0/src/Documentation/Haddock/Types.hs
new/haddock-library-1.11.0/src/Documentation/Haddock/Types.hs
--- old/haddock-library-1.10.0/src/Documentation/Haddock/Types.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/src/Documentation/Haddock/Types.hs
2001-09-09 03:46:40.000000000 +0200
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
+{-# LANGUAGE CPP, DeriveTraversable #-}
-- |
-- Module : Documentation.Haddock.Types
@@ -124,7 +124,7 @@
| DocMonospaced (DocH mod id)
| DocBold (DocH mod id)
| DocUnorderedList [DocH mod id]
- | DocOrderedList [DocH mod id]
+ | DocOrderedList [(Int, DocH mod id)]
| DocDefList [(DocH mod id, DocH mod id)]
| DocCodeBlock (DocH mod id)
| DocHyperlink (Hyperlink (DocH mod id))
@@ -154,7 +154,7 @@
bimap f g (DocMonospaced doc) = DocMonospaced (bimap f g doc)
bimap f g (DocBold doc) = DocBold (bimap f g doc)
bimap f g (DocUnorderedList docs) = DocUnorderedList (map (bimap f g) docs)
- bimap f g (DocOrderedList docs) = DocOrderedList (map (bimap f g) docs)
+ bimap f g (DocOrderedList docs) = DocOrderedList (map (\(index, a) ->
(index, bimap f g a)) docs)
bimap f g (DocDefList docs) = DocDefList (map (bimap f g *** bimap f g) docs)
bimap f g (DocCodeBlock doc) = DocCodeBlock (bimap f g doc)
bimap f g (DocHyperlink (Hyperlink url lbl)) = DocHyperlink (Hyperlink url
(fmap (bimap f g) lbl))
@@ -180,7 +180,7 @@
bifoldr f g z (DocMonospaced doc) = bifoldr f g z doc
bifoldr f g z (DocBold doc) = bifoldr f g z doc
bifoldr f g z (DocUnorderedList docs) = foldr (flip (bifoldr f g)) z docs
- bifoldr f g z (DocOrderedList docs) = foldr (flip (bifoldr f g)) z docs
+ bifoldr f g z (DocOrderedList docs) = foldr (flip (bifoldr f g)) z (map snd
docs)
bifoldr f g z (DocDefList docs) = foldr (\(l, r) acc -> bifoldr f g (bifoldr
f g acc l) r) z docs
bifoldr f g z (DocCodeBlock doc) = bifoldr f g z doc
bifoldr f g z (DocHeader (Header _ title)) = bifoldr f g z title
@@ -201,7 +201,8 @@
bitraverse f g (DocMonospaced doc) = DocMonospaced <$> bitraverse f g doc
bitraverse f g (DocBold doc) = DocBold <$> bitraverse f g doc
bitraverse f g (DocUnorderedList docs) = DocUnorderedList <$> traverse
(bitraverse f g) docs
- bitraverse f g (DocOrderedList docs) = DocOrderedList <$> traverse
(bitraverse f g) docs
+ bitraverse f g (DocOrderedList docs) = DocOrderedList <$> traverseSnd
(bitraverse f g) docs
+ where traverseSnd f' = traverse (\(x, a) -> (\b -> (x, b)) <$> f' a)
bitraverse f g (DocDefList docs) = DocDefList <$> traverse (bitraverse
(bitraverse f g) (bitraverse f g)) docs
bitraverse f g (DocCodeBlock doc) = DocCodeBlock <$> bitraverse f g doc
bitraverse f g (DocHyperlink (Hyperlink url lbl)) = DocHyperlink <$>
(Hyperlink url <$> traverse (bitraverse f g) lbl)
@@ -246,7 +247,7 @@
, markupBold :: a -> a
, markupMonospaced :: a -> a
, markupUnorderedList :: [a] -> a
- , markupOrderedList :: [a] -> a
+ , markupOrderedList :: [(Int,a)] -> a
, markupDefList :: [(a,a)] -> a
, markupCodeBlock :: a -> a
, markupHyperlink :: Hyperlink a -> a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.10.0/test/Documentation/Haddock/Parser/UtilSpec.hs
new/haddock-library-1.11.0/test/Documentation/Haddock/Parser/UtilSpec.hs
--- old/haddock-library-1.10.0/test/Documentation/Haddock/Parser/UtilSpec.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/test/Documentation/Haddock/Parser/UtilSpec.hs
2001-09-09 03:46:40.000000000 +0200
@@ -1,11 +1,14 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Documentation.Haddock.Parser.UtilSpec (main, spec) where
import Documentation.Haddock.Parser.Monad
import Documentation.Haddock.Parser.Util
-import Data.Either.Compat (isLeft)
+import Data.Either (isLeft)
import Test.Hspec
+#if !(MIN_VERSION_base(4,8,0))
import Control.Applicative
+#endif
main :: IO ()
main = hspec spec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/haddock-library-1.10.0/test/Documentation/Haddock/ParserSpec.hs
new/haddock-library-1.11.0/test/Documentation/Haddock/ParserSpec.hs
--- old/haddock-library-1.10.0/test/Documentation/Haddock/ParserSpec.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/haddock-library-1.11.0/test/Documentation/Haddock/ParserSpec.hs
2001-09-09 03:46:40.000000000 +0200
@@ -121,6 +121,9 @@
it "can parse identifiers ending with a single quote" $ do
"'foo''" `shouldParseTo` DocIdentifier "foo'"
+ it "can parse identifiers in backticks ending with a single quote" $ do
+ "`foo'`" `shouldParseTo` DocIdentifier "foo'"
+
it "can parse an identifier containing a digit" $ do
"'f0'" `shouldParseTo` DocIdentifier "f0"
@@ -576,27 +579,37 @@
it "turns it into a code block" $ do
"@foo@" `shouldParseTo` DocCodeBlock "foo"
- context "when a paragraph starts with a markdown link" $ do
- it "correctly parses it as a text paragraph (not a definition list)" $
do
- "[label](url)" `shouldParseTo`
- DocParagraph (hyperlink "url" "label")
-
- it "can be followed by an other paragraph" $ do
- "[label](url)\n\nfoobar" `shouldParseTo`
- DocParagraph (hyperlink "url" "label") <> DocParagraph "foobar"
-
- context "when paragraph contains additional text" $ do
- it "accepts more text after the link" $ do
- "[label](url) foo bar baz" `shouldParseTo`
- DocParagraph (hyperlink "url" "label" <> " foo bar baz")
-
- it "accepts a newline right after the markdown link" $ do
- "[label](url)\nfoo bar baz" `shouldParseTo`
- DocParagraph (hyperlink "url" "label" <> " foo bar baz")
+ context "when a paragraph contains a markdown link" $ do
+ it "correctly parses the link" $ do
+ "Blah [label](url)" `shouldParseTo`
+ DocParagraph ("Blah " <> hyperlink "url" "label")
+
+ context "when the paragraph starts with the markdown link" $ do
+ it "correctly parses it as a text paragraph (not a definition list)"
$ do
+ "[label](url)" `shouldParseTo`
+ DocParagraph (hyperlink "url" "label")
it "can be followed by an other paragraph" $ do
- "[label](url)foo\n\nbar" `shouldParseTo`
- DocParagraph (hyperlink "url" "label" <> "foo") <> DocParagraph
"bar"
+ "[label](url)\n\nfoobar" `shouldParseTo`
+ DocParagraph (hyperlink "url" "label") <> DocParagraph "foobar"
+
+ context "when paragraph contains additional text" $ do
+ it "accepts more text after the link" $ do
+ "[label](url) foo bar baz" `shouldParseTo`
+ DocParagraph (hyperlink "url" "label" <> " foo bar baz")
+
+ it "accepts a newline right after the markdown link" $ do
+ "[label](url)\nfoo bar baz" `shouldParseTo`
+ DocParagraph (hyperlink "url" "label" <> " foo bar baz")
+
+ it "can be followed by an other paragraph" $ do
+ "[label](url)foo\n\nbar" `shouldParseTo`
+ DocParagraph (hyperlink "url" "label" <> "foo") <>
DocParagraph "bar"
+
+ context "when the link starts on a new line not at the beginning of
the paragraph" $ do
+ it "correctly parses the link" $ do
+ "Bla\n[label](url)" `shouldParseTo`
+ DocParagraph ("Bla\n" <> hyperlink "url" "label")
context "when parsing birdtracks" $ do
it "parses them as a code block" $ do
@@ -810,7 +823,7 @@
it "can nest another type of list inside" $ do
"* foo\n\n 1. bar" `shouldParseTo`
DocUnorderedList [ DocParagraph "foo"
- <> DocOrderedList [DocParagraph "bar"]]
+ <> DocOrderedList [(1, DocParagraph "bar")]]
it "can nest a code block inside" $ do
"* foo\n\n @foo bar baz@" `shouldParseTo`
@@ -849,7 +862,7 @@
DocUnorderedList [ DocParagraph "foo"
<> DocUnorderedList [ DocParagraph "bar" ]
]
- <> DocOrderedList [ DocParagraph "baz" ]
+ <> DocOrderedList [ (1, DocParagraph "baz") ]
it "allows arbitrary initial indent of a list" $ do
unlines
@@ -873,20 +886,20 @@
DocDefList [ ("foo", "foov"
<> DocDefList [ ("bar", "barv") ])
]
- <> DocOrderedList [ DocParagraph "baz" ]
+ <> DocOrderedList [ (1, DocParagraph "baz") ]
it "list order is preserved in presence of nesting + extra text" $ do
"1. Foo\n\n > Some code\n\n2. Bar\n\nSome text"
`shouldParseTo`
- DocOrderedList [ DocParagraph "Foo" <> DocCodeBlock "Some code"
- , DocParagraph "Bar"
+ DocOrderedList [ (1, DocParagraph "Foo" <> DocCodeBlock "Some code")
+ , (2, DocParagraph "Bar")
]
<> DocParagraph (DocString "Some text")
"1. Foo\n\n2. Bar\n\nSome text"
`shouldParseTo`
- DocOrderedList [ DocParagraph "Foo"
- , DocParagraph "Bar"
+ DocOrderedList [ (1, DocParagraph "Foo")
+ , (2, DocParagraph "Bar")
]
<> DocParagraph (DocString "Some text")
@@ -970,9 +983,9 @@
, " 3. three"
]
`shouldParseTo` DocOrderedList [
- DocParagraph "one"
- , DocParagraph "two"
- , DocParagraph "three"
+ (1, DocParagraph "one")
+ , (1, DocParagraph "two")
+ , (3, DocParagraph "three")
]
it "ignores empty lines between list items" $ do
@@ -982,12 +995,12 @@
, "2. two"
]
`shouldParseTo` DocOrderedList [
- DocParagraph "one"
- , DocParagraph "two"
+ (1, DocParagraph "one")
+ , (2, DocParagraph "two")
]
it "accepts an empty list item" $ do
- "1." `shouldParseTo` DocOrderedList [DocParagraph DocEmpty]
+ "1." `shouldParseTo` DocOrderedList [(1, DocParagraph DocEmpty)]
it "accepts multi-line list items" $ do
unlines [
@@ -997,12 +1010,12 @@
, "more two"
]
`shouldParseTo` DocOrderedList [
- DocParagraph "point one\n more one"
- , DocParagraph "point two\nmore two"
+ (1, DocParagraph "point one\n more one")
+ , (1, DocParagraph "point two\nmore two")
]
it "accepts markup in list items" $ do
- "1. /foo/" `shouldParseTo` DocOrderedList [DocParagraph (DocEmphasis
"foo")]
+ "1. /foo/" `shouldParseTo` DocOrderedList [(1, DocParagraph
(DocEmphasis "foo"))]
it "requires empty lines between list and other paragraphs" $ do
unlines [
@@ -1012,7 +1025,7 @@
, ""
, "baz"
]
- `shouldParseTo` DocParagraph "foo" <> DocOrderedList [DocParagraph
"bar"] <> DocParagraph "baz"
+ `shouldParseTo` DocParagraph "foo" <> DocOrderedList [(1, DocParagraph
"bar")] <> DocParagraph "baz"
context "when parsing definition lists" $ do
it "parses a simple list" $ do
@@ -1099,8 +1112,8 @@
] `shouldParseTo`
DocUnorderedList [ DocParagraph "bullet"
, DocParagraph "different bullet"]
- <> DocOrderedList [ DocParagraph "ordered"
- , DocParagraph "different bullet"
+ <> DocOrderedList [ (1, DocParagraph "ordered")
+ , (2, DocParagraph "different bullet")
]
<> DocDefList [ ("cat", "kitten")
, ("pineapple", "fruit")
++++++ haddock-library.cabal ++++++
--- /var/tmp/diff_new_pack.4ImZFb/_old 2023-04-04 21:20:29.289216317 +0200
+++ /var/tmp/diff_new_pack.4ImZFb/_new 2023-04-04 21:20:29.293216343 +0200
@@ -1,7 +1,7 @@
-cabal-version: 2.2
+cabal-version: 3.0
name: haddock-library
-version: 1.10.0
-x-revision: 3
+version: 1.11.0
+x-revision: 1
synopsis: Library exposing some functionality of Haddock.
description: Haddock is a documentation-generation tool for Haskell
@@ -29,6 +29,7 @@
, GHC == 8.8.3
, GHC == 8.10.1
, GHC == 9.0.1
+ , GHC == 9.2.0
extra-source-files:
CHANGES.md
@@ -39,10 +40,8 @@
default-language: Haskell2010
build-depends:
- , base >= 4.5 && < 4.17
- , bytestring
+ , base >= 4.5 && < 4.18
, containers ^>= 0.4.2.1 || ^>= 0.5.0.0 || ^>= 0.6.0.1
- , transformers
, text ^>= 1.2.3.0 || ^>= 2.0
, parsec ^>= 3.1.13.0
@@ -88,7 +87,7 @@
Documentation.Haddock.Parser.Identifier
build-depends:
- , base-compat ^>= 0.9.3 || ^>= 0.11.0
+ , base-compat ^>= 0.12.0
, QuickCheck ^>= 2.11 || ^>= 2.13.2 || ^>= 2.14
, deepseq ^>= 1.3.0.0 || ^>= 1.4.0.0
@@ -97,10 +96,10 @@
-- version of `hspec` & `hspec-discover` to ensure
-- intercompatibility
build-depends:
- , hspec >= 2.4.4 && < 2.8
+ , hspec >= 2.4.4 && < 2.10
build-tool-depends:
- , hspec-discover:hspec-discover >= 2.4.4 && < 2.8
+ , hspec-discover:hspec-discover >= 2.4.4 && < 2.10
test-suite fixtures
type: exitcode-stdio-1.0
@@ -115,11 +114,11 @@
, base
-- extra dependencies
- , base-compat ^>= 0.9.3 || ^>= 0.11.0
+ , base-compat ^>= 0.12.0
, directory ^>= 1.3.0.2
, filepath ^>= 1.4.1.2
, optparse-applicative ^>= 0.15
- , tree-diff ^>= 0.1
+ , tree-diff ^>= 0.2
source-repository head
type: git