packages feed

megaparsec 9.2.0 → 9.2.1

raw patch · 6 files changed

+37/−26 lines, 6 filesdep ~criteriondep ~transformers

Dependency ranges changed: criterion, transformers

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+*Megaparsec follows [SemVer](https://semver.org/).*++## Megaparsec 9.2.1++* Builds with `mtl-2.3` and `transformers-0.6`.+ ## Megaparsec 9.2.0  * Added parsers for binary representations (little/big endian) of numbers in
Text/Megaparsec/Class.hs view
@@ -205,12 +205,10 @@     m (Tokens s)    -- | Parse /zero/ or more tokens for which the supplied predicate holds.-  -- Try to use this as much as possible because for many streams the+  -- Try to use this as much as possible because for many streams this   -- combinator is much faster than parsers built with   -- 'Control.Monad.Combinators.many' and 'Text.Megaparsec.satisfy'.   ---  -- The following equations should clarify the behavior:-  --   -- > takeWhileP (Just "foo") f = many (satisfy f <?> "foo")   -- > takeWhileP Nothing      f = many (satisfy f)   --@@ -226,8 +224,15 @@     m (Tokens s)    -- | Similar to 'takeWhileP', but fails if it can't parse at least one-  -- token. Note that the combinator either succeeds or fails without-  -- consuming any input, so 'try' is not necessary with it.+  -- token. Try to use this as much as possible because for many streams+  -- this combinator is much faster than parsers built with+  -- 'Control.Monad.Combinators.some' and 'Text.Megaparsec.satisfy'.+  --+  -- > takeWhile1P (Just "foo") f = some (satisfy f <?> "foo")+  -- > takeWhile1P Nothing      f = some (satisfy f)+  --+  -- Note that the combinator either succeeds or fails without consuming any+  -- input, so 'try' is not necessary with it.   --   -- @since 6.0.0   takeWhile1P ::
Text/Megaparsec/Error.hs view
@@ -498,7 +498,7 @@ messageItemsPretty prefix ts   | E.null ts = ""   | otherwise =-    prefix <> (orList . NE.fromList . E.toAscList) ts <> "\n"+      prefix <> (orList . NE.fromList . E.toAscList) ts <> "\n"  -- | Print a pretty list where items are separated with commas and the word -- “or” according to the rules of English punctuation.
Text/Megaparsec/Internal.hs view
@@ -331,7 +331,7 @@           Error _ -> error "mfix ParsecT"     runParsecT (f a) s -instance MonadTrans (ParsecT e s) where+instance Stream s => MonadTrans (ParsecT e s) where   lift amb = ParsecT $ \s _ _ eok _ ->     amb >>= \a -> eok a s mempty 
Text/Megaparsec/Stream.hs view
@@ -423,17 +423,17 @@             w = unPos pstateTabWidth          in if                 | ch == newlineTok ->-                  St-                    (SourcePos n (l <> pos1) pos1)-                    id+                    St+                      (SourcePos n (l <> pos1) pos1)+                      id                 | ch == tabTok ->-                  St-                    (SourcePos n l (mkPos $ c' + w - ((c' - 1) `rem` w)))-                    (g . (fromTok ch :))+                    St+                      (SourcePos n l (mkPos $ c' + w - ((c' - 1) `rem` w)))+                      (g . (fromTok ch :))                 | otherwise ->-                  St-                    (SourcePos n l (c <> pos1))-                    (g . (fromTok ch :))+                    St+                      (SourcePos n l (c <> pos1))+                      (g . (fromTok ch :)) {-# INLINE reachOffset' #-}  -- | Like 'reachOffset'' but for 'reachOffsetNoLine'.@@ -474,11 +474,11 @@             w = unPos pstateTabWidth          in if                 | ch == newlineTok ->-                  SourcePos n (l <> pos1) pos1+                    SourcePos n (l <> pos1) pos1                 | ch == tabTok ->-                  SourcePos n l (mkPos $ c' + w - ((c' - 1) `rem` w))+                    SourcePos n l (mkPos $ c' + w - ((c' - 1) `rem` w))                 | otherwise ->-                  SourcePos n l (c <> pos1)+                    SourcePos n l (c <> pos1) {-# INLINE reachOffsetNoLine' #-}  -- | Like 'BL.splitAt' but accepts the index as an 'Int'.
megaparsec.cabal view
@@ -1,7 +1,7 @@-cabal-version:   1.18+cabal-version:   2.4 name:            megaparsec-version:         9.2.0-license:         BSD2+version:         9.2.1+license:         BSD-2-Clause license-file:    LICENSE.md maintainer:      Mark Karpov <markkarpov92@gmail.com> author:@@ -9,7 +9,7 @@     Paolo Martini <paolo@nemail.it>,     Daan Leijen <daan@microsoft.com> -tested-with:     ghc ==8.8.4 ghc ==8.10.5 ghc ==9.0.1+tested-with:     ghc ==8.10.7 ghc ==9.0.2 ghc ==9.2.1 homepage:        https://github.com/mrkkrp/megaparsec bug-reports:     https://github.com/mrkkrp/megaparsec/issues synopsis:        Monadic parser combinators@@ -64,7 +64,7 @@         mtl >=2.2.2 && <3.0,         parser-combinators >=1.0 && <2.0,         scientific >=0.3.7 && <0.4,-        text >=0.2 && <1.3,+        text >=0.2 && <2.1,         transformers >=0.4 && <0.7      if flag(dev)@@ -90,7 +90,7 @@         criterion >=0.6.2.1 && <1.6,         deepseq >=1.3 && <1.5,         megaparsec,-        text >=0.2 && <1.3+        text >=0.2 && <2.1      if flag(dev)         ghc-options: -O2 -Wall -Werror@@ -109,7 +109,7 @@         containers >=0.5 && <0.7,         deepseq >=1.3 && <1.5,         megaparsec,-        text >=0.2 && <1.3,+        text >=0.2 && <2.1,         weigh >=0.0.4      if flag(dev)