packages feed

uu-parsinglib 2.7.2.1 → 2.7.2.2

raw patch · 4 files changed

+12/−6 lines, 4 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Text.ParserCombinators.UU.Demo.MergeAndPermute: pABC' :: Grammar String

Files

src/Text/ParserCombinators/UU/CHANGELOG.hs view
@@ -1,5 +1,9 @@ -- | This module just contains the CHANGELOG --+-- Version 2.7.2.2+--+-- fixed the case where the left hand operand of  <<||> strats with a monadic bind+-- -- Version 2.7.2.1 -- -- removed a left-over from debugging
src/Text/ParserCombinators/UU/Demo/MergeAndPermute.hs view
@@ -126,6 +126,8 @@ --   a log-file which contains all events generated by a collection of concurrently running transactions. pABC :: Grammar Char pABC = mkGram (pa *> pDigit ) >>= (\ d ->  mkGram (pb *> pSym d) *> mkGram (pc *> pSym d))+pABC' :: Grammar String	+pABC' = (\ a d -> d:a) <$> pA <*> (pDigit' >>= \d ->  pB *> mkGram (pSym d) *> pC *> mkGram (pSym d))   
src/Text/ParserCombinators/UU/MergeAndPermute.hs view
@@ -91,11 +91,11 @@            ++ [ fc `Bind` (\c -> pg <||> c2fb c)   | fc `Bind` c2fb   <- ql]           )   (pe <*> qe)                                          --- |  The function `<<||>` is a special version of `<||>`, whch only starts a new instance of its right operand when the left operand cannot proceed.---   This is used in the function 'pmMany', where we want to merge as many instances of its argument, but not more than that.+-- |  The function `<<||>` is a special version of `<||>`, which only starts a new instance of its right operand when the left operand cannot proceed.+--   This is used in the function 'pmMany', where we want to merge as many instances of its argument, but no more than that. (<<||>):: Functor f => Gram f (b->a) -> Gram f b -> Gram f a pg@(Gram pl pe) <<||> ~qg@(Gram ql qe)-   = Gram (   [ p `Seq` (flip  <$> pp <||> qg)| p `Seq` pp <- pl]+   = Gram (   [ p `Seq` (flip  <$> pp <||> qg)| p `Seq` pp <- pl] ++ [p `Bind` (\ a -> pp a <||> qg)| p `Bind` pp <- pl]           )   (pe <*> qe)  @@ -116,9 +116,9 @@              where mkParserAlt (p `Seq` pp) = sep *> p <**> mkParserP sep pp                    mkParserAlt (fc `Bind` c2fa) = fc >>=  (mkParserP sep . c2fa) --- | Run a sufficient number of  @p@'s in a merged fashion, but not more than necessary!!+-- | Run a sufficient number of  @p@'s in a merged fashion, but no more than necessary!! pmMany :: Functor f => Gram f a -> Gram f [a]-pmMany p = let pm = (:) <$> p <<||> pm <|> pure [] in pm+pmMany p = let pm = ( (:) <$> p <<||> pm ) <|> pure [] in pm   
uu-parsinglib.cabal view
@@ -1,5 +1,5 @@ Name:                uu-parsinglib-Version:             2.7.2.1+Version:             2.7.2.2 Build-Type:          Simple License:             MIT Copyright:           S Doaitse Swierstra