parsec-extra 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+4/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- parsec-extra.cabal +1/−1
- src/Text/Parsec/Extra.hs +3/−3
parsec-extra.cabal view
@@ -1,5 +1,5 @@ Name: parsec-extra-Version: 0.1.0.0+Version: 0.1.0.1 Cabal-Version: >= 1.6 License: BSD3 Author: Arie Peterson
src/Text/Parsec/Extra.hs view
@@ -22,7 +22,7 @@ import Text.ParserCombinators.Parsec.Char (char) --- | Parse "end of line": one of "\n", "\r\n", or "\r".+-- | Parse \"end of line\": one of \"\n\", \"\r\n\", or \"\r\". eol :: GenParser Char state () eol = (char '\n' <|> (char '\r' >> option '\n' (char '\n'))) >> return () @@ -34,7 +34,7 @@ natural :: (Integral a) => GenParser Char state a natural = (foldl' (\ a b -> a * 10 + b) 0 <$> many1 digit) <?> "nonnegative decimal integer" --- | An integer number, in decimal notation (possibly prefixed with "-").+-- | An integer number, in decimal notation (possibly prefixed with \"-\"). integer :: (Integral a) => GenParser Char state a integer = (option id (char '-' *> pure negate) <*> natural) <?> "decimal integer" @@ -52,6 +52,6 @@ -- | Parsing function. Uses the 'MonadError' class to throw a monadic error -- when parsing fails. (Useful in a stack of monad transformers from the--- "transformers" package.)+-- transformers package <http://hackage.haskell.org/package/transformers>.) parseM :: (MonadError m,Error (ErrorType m)) => GenParser t () a -> String -> [t] -> m a parseM p s = either (throwError . strMsg . show) return . parse p s