Hello community,

here is the log from the commit of package ghc-megaparsec for openSUSE:Factory 
checked in at 2018-11-09 07:52:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-megaparsec (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-megaparsec.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-megaparsec"

Fri Nov  9 07:52:19 2018 rev:4 rq:646356 version:7.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-megaparsec/ghc-megaparsec.changes    
2018-10-25 08:17:50.248031500 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-megaparsec.new/ghc-megaparsec.changes       
2018-11-09 07:52:28.263845328 +0100
@@ -1,0 +2,22 @@
+Thu Nov  1 03:02:28 UTC 2018 - [email protected]
+
+- Update megaparsec to version 7.0.3.
+  ## Megaparsec 7.0.3
+
+  * Fixed the build with `mtl` older than `2.2.2`.
+
+-------------------------------------------------------------------
+Mon Oct 22 10:35:50 UTC 2018 - [email protected]
+
+- Update megaparsec to version 7.0.2.
+  ## Megaparsec 7.0.2
+
+  * Fixed the property test for `char'` which was failing in the case when
+    there is a character with different upper and title cases.
+
+  * More descriptive error messages when `elabel` or `ulabel` from
+    `Text.Megaparsec.Error.Builder` are used with empty strings.
+
+  * Typos fixes in the docs.
+
+-------------------------------------------------------------------

Old:
----
  megaparsec-7.0.1.tar.gz

New:
----
  megaparsec-7.0.3.tar.gz

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

Other differences:
------------------
++++++ ghc-megaparsec.spec ++++++
--- /var/tmp/diff_new_pack.4YWmgv/_old  2018-11-09 07:52:30.239843055 +0100
+++ /var/tmp/diff_new_pack.4YWmgv/_new  2018-11-09 07:52:30.267843023 +0100
@@ -19,7 +19,7 @@
 %global pkg_name megaparsec
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        7.0.1
+Version:        7.0.3
 Release:        0
 Summary:        Monadic parser combinators
 License:        BSD-2-Clause

++++++ megaparsec-7.0.1.tar.gz -> megaparsec-7.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/megaparsec-7.0.1/CHANGELOG.md 
new/megaparsec-7.0.3/CHANGELOG.md
--- old/megaparsec-7.0.1/CHANGELOG.md   2018-09-15 11:08:53.000000000 +0200
+++ new/megaparsec-7.0.3/CHANGELOG.md   2018-10-31 12:17:51.000000000 +0100
@@ -1,3 +1,17 @@
+## Megaparsec 7.0.3
+
+* Fixed the build with `mtl` older than `2.2.2`.
+
+## Megaparsec 7.0.2
+
+* Fixed the property test for `char'` which was failing in the case when
+  there is a character with different upper and title cases.
+
+* More descriptive error messages when `elabel` or `ulabel` from
+  `Text.Megaparsec.Error.Builder` are used with empty strings.
+
+* Typos fixes in the docs.
+
 ## Megaparsec 7.0.1
 
 * Fixed a bug in `errorBundlePretty`. Previously the question sign `?` was
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/megaparsec-7.0.1/README.md 
new/megaparsec-7.0.3/README.md
--- old/megaparsec-7.0.1/README.md      2018-09-15 11:08:53.000000000 +0200
+++ new/megaparsec-7.0.3/README.md      2018-10-31 12:17:51.000000000 +0100
@@ -181,9 +181,10 @@
 
 ### Megaparsec vs Attoparsec
 
-[Attoparsec](https://github.com/bos/attoparsec) is another prominent Haskell
-library for parsing. Although the both libraries deal with parsing, it's
-usually easy to decide which you will need in particular project:
+[Attoparsec](https://hackage.haskell.org/package/attoparsec) is another
+prominent Haskell library for parsing. Although the both libraries deal with
+parsing, it's usually easy to decide which you will need in particular
+project:
 
 * *Attoparsec* is sometimes faster but not that feature-rich. It should be
   used when you want to process large amounts of data where performance
@@ -204,8 +205,9 @@
 
 ### Megaparsec vs Parsec
 
-Since Megaparsec is a fork of Parsec, we are bound to list the main
-differences between the two libraries:
+Since Megaparsec is a fork of
+[Parsec](https://hackage.haskell.org/package/parsec), we are bound to list
+the main differences between the two libraries:
 
 * Better error messages. We test our error messages using numerous
   QuickCheck (generative) tests. Good error messages are just as important
@@ -252,8 +254,9 @@
   `takeWhileP`, `takeWhile1P`, `takeP` like Attoparsec.
 
 If you want to see a detailed change log, `CHANGELOG.md` may be helpful.
-Also see [this original announcement](https://notehub.org/w7037) for another
-comparison.
+Also see [this original
+announcement](https://mail.haskell.org/pipermail/haskell-cafe/2015-September/121530.html)
+for another comparison.
 
 ### Megaparsec vs Trifecta
 
@@ -346,7 +349,7 @@
 * [Latest additions to 
Megaparsec](https://markkarpov.com/post/latest-additions-to-megaparsec.html)
 * [Announcing Megaparsec 
5](https://markkarpov.com/post/announcing-megaparsec-5.html)
 * [Megaparsec 4 and 5](https://markkarpov.com/post/megaparsec-4-and-5.html)
-* [The original Megaparsec 4.0.0 announcement](https://notehub.org/w7037)
+* [The original Megaparsec 4.0.0 
announcement](https://mail.haskell.org/pipermail/haskell-cafe/2015-September/121530.html)
 
 ## Authors
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/megaparsec-7.0.1/Text/Megaparsec/Char/Lexer.hs 
new/megaparsec-7.0.3/Text/Megaparsec/Char/Lexer.hs
--- old/megaparsec-7.0.1/Text/Megaparsec/Char/Lexer.hs  2018-09-15 
11:08:53.000000000 +0200
+++ new/megaparsec-7.0.3/Text/Megaparsec/Char/Lexer.hs  2018-10-31 
12:17:51.000000000 +0100
@@ -28,7 +28,6 @@
 --
 -- To do lexing of byte streams, see "Text.Megaparsec.Byte.Lexer".
 
-{-# LANGUAGE CPP                 #-}
 {-# LANGUAGE FlexibleContexts    #-}
 {-# LANGUAGE MultiWayIf          #-}
 {-# LANGUAGE ScopedTypeVariables #-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/megaparsec-7.0.1/Text/Megaparsec/Char.hs 
new/megaparsec-7.0.3/Text/Megaparsec/Char.hs
--- old/megaparsec-7.0.1/Text/Megaparsec/Char.hs        2018-09-15 
11:08:53.000000000 +0200
+++ new/megaparsec-7.0.3/Text/Megaparsec/Char.hs        2018-10-31 
12:17:51.000000000 +0100
@@ -11,7 +11,6 @@
 --
 -- Commonly used character parsers.
 
-{-# LANGUAGE CPP                 #-}
 {-# LANGUAGE FlexibleContexts    #-}
 {-# LANGUAGE LambdaCase          #-}
 {-# LANGUAGE ScopedTypeVariables #-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/megaparsec-7.0.1/Text/Megaparsec/Error/Builder.hs 
new/megaparsec-7.0.3/Text/Megaparsec/Error/Builder.hs
--- old/megaparsec-7.0.1/Text/Megaparsec/Error/Builder.hs       2018-09-15 
11:08:53.000000000 +0200
+++ new/megaparsec-7.0.3/Text/Megaparsec/Error/Builder.hs       2018-10-31 
12:17:51.000000000 +0100
@@ -134,7 +134,9 @@
 -- strings (for empty strings it's bottom).
 
 ulabel :: Stream s => String -> ET s
-ulabel = unexp . Label . NE.fromList
+ulabel label
+  | label == "" = error "Text.Megaparsec.Error.Builder.ulabel: empty label"
+  | otherwise = unexp . Label . NE.fromList $ label
 
 -- | Construct an “unexpected end of input” error component.
 
@@ -156,7 +158,9 @@
 -- strings.
 
 elabel :: Stream s => String -> ET s
-elabel = expe . Label . NE.fromList
+elabel label
+  | label == "" = error "Text.Megaparsec.Error.Builder.elabel: empty label"
+  | otherwise = expe . Label . NE.fromList $ label
 
 -- | Construct an “expected end of input” error component.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/megaparsec-7.0.1/Text/Megaparsec/Error.hs 
new/megaparsec-7.0.3/Text/Megaparsec/Error.hs
--- old/megaparsec-7.0.1/Text/Megaparsec/Error.hs       2018-09-15 
11:08:53.000000000 +0200
+++ new/megaparsec-7.0.3/Text/Megaparsec/Error.hs       2018-10-31 
12:17:51.000000000 +0100
@@ -105,8 +105,8 @@
   rnf (ErrorIndentation ord ref act) = ord `seq` rnf ref `seq` rnf act
   rnf (ErrorCustom a) = rnf a
 
--- | @'ParseError' t e@ represents a parse error parametrized over the token
--- type @t@ and the custom data @e@.
+-- | @'ParseError' s e@ represents a parse error parametrized over the
+-- stream type @s@ and the custom data @e@.
 --
 -- 'Semigroup' and 'Monoid' instances of the data type allow to merge parse
 -- errors from different branches of parsing. When merging two
@@ -119,8 +119,8 @@
 data ParseError s e
   = TrivialError Int (Maybe (ErrorItem (Token s))) (Set (ErrorItem (Token s)))
     -- ^ Trivial errors, generated by Megaparsec's machinery. The data
-    -- constructor includes the source position of error, unexpected token
-    -- (if any), and expected tokens.
+    -- constructor includes the offset of error, unexpected token (if any),
+    -- and expected tokens.
     --
     -- Type of the first argument was changed in the version /7.0.0/.
   | FancyError Int (Set (ErrorFancy e))
@@ -382,7 +382,7 @@
   "offset=" <> show (errorOffset e) <> ":\n" <> parseErrorTextPretty e
 
 -- | Pretty-print a textual part of a 'ParseError', that is, everything
--- except stack of source positions. The rendered 'String' always ends with a
+-- except for its position. The rendered 'String' always ends with a
 -- newline.
 --
 -- @since 5.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/megaparsec-7.0.1/Text/Megaparsec.hs 
new/megaparsec-7.0.3/Text/Megaparsec.hs
--- old/megaparsec-7.0.1/Text/Megaparsec.hs     2018-09-15 11:08:53.000000000 
+0200
+++ new/megaparsec-7.0.3/Text/Megaparsec.hs     2018-10-31 12:17:51.000000000 
+0100
@@ -98,7 +98,6 @@
   , setParserState )
 where
 
-import Control.Monad
 import Control.Monad.Combinators
 import Control.Monad.Identity
 import Data.List.NonEmpty (NonEmpty (..))
@@ -237,7 +236,7 @@
   -> String        -- ^ Name of source file
   -> s             -- ^ Input for parser
   -> m (Either (ParseErrorBundle s e) a)
-runParserT p name s = snd `liftM` runParserT' p (initialState name s)
+runParserT p name s = snd <$> runParserT' p (initialState name s)
 
 -- | This function is similar to 'runParserT', but like 'runParser'' it
 -- accepts and returns parser state. This is thus the most general way to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/megaparsec-7.0.1/megaparsec.cabal 
new/megaparsec-7.0.3/megaparsec.cabal
--- old/megaparsec-7.0.1/megaparsec.cabal       2018-09-15 11:08:53.000000000 
+0200
+++ new/megaparsec-7.0.3/megaparsec.cabal       2018-10-31 12:17:51.000000000 
+0100
@@ -1,7 +1,7 @@
 name:                 megaparsec
-version:              7.0.1
+version:              7.0.3
 cabal-version:        1.18
-tested-with:          GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
+tested-with:          GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, 
GHC==8.6.1
 license:              BSD2
 license-file:         LICENSE.md
 author:               Megaparsec contributors,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/megaparsec-7.0.1/tests/Test/Hspec/Megaparsec/AdHoc.hs 
new/megaparsec-7.0.3/tests/Test/Hspec/Megaparsec/AdHoc.hs
--- old/megaparsec-7.0.1/tests/Test/Hspec/Megaparsec/AdHoc.hs   2018-09-15 
11:08:53.000000000 +0200
+++ new/megaparsec-7.0.3/tests/Test/Hspec/Megaparsec/AdHoc.hs   2018-10-31 
12:17:51.000000000 +0100
@@ -3,6 +3,7 @@
 {-# LANGUAGE RankNTypes           #-}
 {-# LANGUAGE ScopedTypeVariables  #-}
 {-# LANGUAGE TypeFamilies         #-}
+{-# LANGUAGE UndecidableInstances #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 
 module Test.Hspec.Megaparsec.AdHoc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/megaparsec-7.0.1/tests/Text/Megaparsec/CharSpec.hs 
new/megaparsec-7.0.3/tests/Text/Megaparsec/CharSpec.hs
--- old/megaparsec-7.0.1/tests/Text/Megaparsec/CharSpec.hs      2018-09-15 
11:08:53.000000000 +0200
+++ new/megaparsec-7.0.3/tests/Text/Megaparsec/CharSpec.hs      2018-10-31 
12:17:51.000000000 +0100
@@ -5,7 +5,7 @@
 
 import Control.Monad
 import Data.Char
-import Data.List (partition, isPrefixOf)
+import Data.List (nub, partition, isPrefixOf)
 import Data.Monoid ((<>))
 import Test.Hspec
 import Test.Hspec.Megaparsec
@@ -236,7 +236,8 @@
     context "when stream is empty" $
       it "signals correct parse error" $
         property $ \ch -> do
-          let ms = ueof <> etok (toLower ch) <> etok (toUpper ch)
+          let options = etok <$> [toLower ch, toTitle ch, toUpper ch]
+              ms = ueof <> mconcat (nub options)
           prs  (char' ch) "" `shouldFailWith` err 0 ms
 
   describe "string" $ do


Reply via email to