packages feed

bookhound 0.1.22.0 → 0.1.23.0

raw patch · 2 files changed

+13/−11 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

bookhound.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           bookhound-version:        0.1.22.0+version:        0.1.23.0 synopsis:       Simple Parser Combinators description:    Please see the README on GitHub at <https://github.com/albertprz/bookhound#readme> category:       Parser Combinators
src/Bookhound/Parser.hs view
@@ -192,7 +192,14 @@ withTransform t = applyTransform $ Just t  +nonConsumingParser :: Parser a -> Parser a+nonConsumingParser (P p t e) = applyTransformError t e $ mkParser (+  \x -> case p x of+    Result _ pe a -> Result x pe a+    err           -> err+  ) + applyTransformsErrors :: (forall b. [Maybe (Parser b -> Parser b)])                       -> [Set (Int, ParseError)]                       -> Parser a@@ -209,16 +216,11 @@   -nonConsumingParser :: Parser a -> Parser a-nonConsumingParser (P p t e) = applyTransformError t e $ mkParser (-  \x -> case p x of-    Result _ pe a -> Result x pe a-    err           -> err-  )--mapErrorResult :: (ParseError -> Maybe ParseError) -> ParseResult a -> ParseResult a-mapErrorResult f (Error pe) = Error $ fromMaybe pe $ f pe-mapErrorResult _  result    = result+mapErrorResult :: (ParseError -> Maybe ParseError)+               -> ParseResult a+               -> ParseResult a+mapErrorResult f (Error pe)      = Error $ fromMaybe pe $ f pe+mapErrorResult f (Result i pe a) = Result i (fromMaybe pe $ f <$> pe) a   wrapMaybeError :: ParseError -> Maybe ParseError