packages feed

parsec3 1.0.0.1 → 1.0.0.2

raw patch · 4 files changed

+25/−24 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Text/Parsec/Combinator.hs view
@@ -50,7 +50,7 @@ option :: (Stream s m t) => a -> ParsecT s u m a -> ParsecT s u m a option x p          = p <|> return x --- | @option p@ tries to apply parser @p@.  If @p@ fails without+-- | @optionMaybe p@ tries to apply parser @p@.  If @p@ fails without -- consuming input, it return 'Nothing', otherwise it returns -- 'Just' the value returned by @p@. @@ -85,7 +85,7 @@                       scan  = do{ p; scan } <|> return () -} --- | @many p@ applies the parser @p@ /one/ or more times. Returns a+-- | @many1 p@ applies the parser @p@ /one/ or more times. Returns a -- list of the returned values of @p@. -- -- >  word  = many1 letter@@ -266,7 +266,7 @@ -- >                      ; manyTill anyChar (try (string "-->")) -- >                      } -----    Note the overlapping parsers @anyChar@ and @string \"<!--\"@, and+--    Note the overlapping parsers @anyChar@ and @string \"-->\"@, and --    therefore the use of the 'try' combinator.  manyTill :: (Stream s m t) => ParsecT s u m a -> ParsecT s u m end -> ParsecT s u m [a]
Text/Parsec/Pos.hs view
@@ -3,13 +3,13 @@ -- Module      :  Text.Parsec.Pos -- Copyright   :  (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007 -- License     :  BSD-style (see the LICENSE file)--- +-- -- Maintainer  :  derek.a.elkins@gmail.com -- Stability   :  provisional -- Portability :  portable--- +-- -- Textual source positions.--- +-- -----------------------------------------------------------------------------  module Text.Parsec.Pos@@ -22,7 +22,8 @@     , updatePosChar, updatePosString     ) where -import Data.Generics+import Data.Data (Data)+import Data.Typeable (Typeable)  -- < Source positions: a file name, a line and a column -- upper left is (1,1)@@ -34,7 +35,7 @@ -- | The abstract data type @SourcePos@ represents source positions. It -- contains the name of the source (i.e. file name), a line number and -- a column number. @SourcePos@ is an instance of the 'Show', 'Eq' and--- 'Ord' class. +-- 'Ord' class.  data SourcePos  = SourcePos SourceName !Line !Column     deriving ( Eq, Ord, Data, Typeable)@@ -53,27 +54,27 @@ initialPos name     = newPos name 1 1 --- | Extracts the name of the source from a source position. +-- | Extracts the name of the source from a source position.  sourceName :: SourcePos -> SourceName sourceName (SourcePos name _line _column) = name --- | Extracts the line number from a source position. +-- | Extracts the line number from a source position.  sourceLine :: SourcePos -> Line sourceLine (SourcePos _name line _column) = line --- | Extracts the column number from a source position. +-- | Extracts the column number from a source position.  sourceColumn :: SourcePos -> Column sourceColumn (SourcePos _name _line column) = column --- | Increments the line number of a source position. +-- | Increments the line number of a source position.  incSourceLine :: SourcePos -> Line -> SourcePos incSourceLine (SourcePos name line column) n = SourcePos name (line+n) column --- | Increments the column number of a source position. +-- | Increments the column number of a source position.  incSourceColumn :: SourcePos -> Column -> SourcePos incSourceColumn (SourcePos name line column) n = SourcePos name line (column+n)@@ -83,19 +84,19 @@ setSourceName :: SourcePos -> SourceName -> SourcePos setSourceName (SourcePos _name line column) n = SourcePos n line column --- | Set the line number of a source position. +-- | Set the line number of a source position.  setSourceLine :: SourcePos -> Line -> SourcePos setSourceLine (SourcePos name _line column) n = SourcePos name n column --- | Set the column number of a source position. +-- | Set the column number of a source position.  setSourceColumn :: SourcePos -> Column -> SourcePos setSourceColumn (SourcePos name line _column) n = SourcePos name line n  -- | The expression @updatePosString pos s@ updates the source position -- @pos@ by calling 'updatePosChar' on every character in @s@, ie.--- @foldl updatePosChar pos string@. +-- @foldl updatePosChar pos string@.  updatePosString :: SourcePos -> String -> SourcePos updatePosString pos string@@ -106,7 +107,7 @@ -- incremented by 1. If the character is a tab (\'\t\') the column -- number is incremented to the nearest 8'th column, ie. @column + 8 - -- ((column-1) \`mod\` 8)@. In all other cases, the column is--- incremented by 1. +-- incremented by 1.  updatePosChar   :: SourcePos -> Char -> SourcePos updatePosChar (SourcePos name line column) c
Text/Parsec/Prim.hs view
@@ -228,7 +228,7 @@                                                                  -- if (k x) doesn't consume input, but is okay,                  -- we still return in the consumed continuation-                 peok = cok+                 peok x s err' = cok x s (mergeError err err')                   -- if (k x) doesn't consume input, but errors,                  -- we return the error in the 'consumed-error'@@ -241,7 +241,7 @@             let                 -- in these cases, (k x) can return as empty                 pcok = cok-                peok = eok+                peok x s err' = eok x s (mergeError err err')                 pcerr = cerr                 peerr err' = eerr (mergeError err err')              in  unParser (k x) s pcok pcerr peok peerr@@ -436,7 +436,7 @@     let pcerr parseError = eerr $ setErrorPos pos parseError      in unParser p s cok pcerr eok eerr --- | The parser @token showTok posFromTok testTok@ accepts a token @t@+-- | The parser @tokenPrim showTok posFromTok testTok@ accepts a token @t@ -- with result @x@ when the function @testTok t@ returns @'Just' x@. The -- source position of the @t@ should be returned by @posFromTok t@ and -- the token can be shown using @showTok t@.
parsec3.cabal view
@@ -1,5 +1,5 @@ name:           parsec3-version:        1.0.0.1+version:        1.0.0.2 cabal-version: >= 1.2.3 license:        BSD3 license-file:   LICENSE@@ -23,12 +23,12 @@         versions, therefore I do not recommend to unconditionally use parsec3         as dependency in cabal files of packages for hackage.  But you may         want to develop your code using this subset of parsec3 modules and-        finally change the dependency from parsec3 to parsec-3.1.0 in order to+        finally change the dependency from parsec3 to parsec-3.1.1 in order to         avoid module ambiguities for users just installing your package.  Your         own module ambiguities are best avoided by hiding packages.         .-        This version only differs from the previous one by a changed-        description.+        This version re-exports parts of the Applicative module instead of extra+        functions with the same name. library     exposed-modules:         Text.Parsec,