packages feed

uu-parsinglib 2.5.5 → 2.5.5.1

raw patch · 4 files changed

+18/−5 lines, 4 filesdep ~basedep ~haskell98PVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: base, haskell98

API changes (from Hackage documentation)

+ Text.ParserCombinators.UU.Core: best :: Steps a -> Steps a -> Steps a
+ Text.ParserCombinators.UU.Core: mkParser :: Maybe (T st a) -> Maybe a -> T st a
+ Text.ParserCombinators.UU.Core: nat_min :: Nat -> Nat -> Int -> (Nat, Bool)

Files

src/Text/ParserCombinators/UU/CHANGELOG.hs view
@@ -1,5 +1,9 @@ -- | This module just contains the CHANGELOG--- Version 2.5.5+-- Version 2.5.5.1+--+--      *  type signatures were added to make the library GHC 7 ready.+--+---- Version 2.5.5 -- --      *  preference is given to earlier accept steps in order to avoid infinite insertions in case of otherwise equivalent repair strategies --
src/Text/ParserCombinators/UU/Core.hs view
@@ -107,6 +107,7 @@ getZeroP (P _ _ l Nothing)         =  Nothing getZeroP (P _ _ l pe)              =  Just (P (mkParser Nothing pe) Nothing l pe) -- TODO check for erroneous parsers +mkParser :: Maybe (T st a) -> Maybe a -> T st a mkParser np@Nothing   ne@Nothing   =  empty            mkParser np@(Just nt) ne@Nothing   =  nt               mkParser np@Nothing   ne@(Just a)  =          (pure a)        @@ -169,6 +170,7 @@ instance ExtAlternative (P st) where   P ap np pl pe <<|> P aq nq ql qe      = let (rl, b) = nat_min pl ql 0+          bestx :: Steps a -> Steps a -> Steps a           bestx = if b then flip best else best           choose:: T st a -> T st a -> T st a           choose  (T ph pf pr)  (T qh qf qr) @@ -255,6 +257,7 @@               Just ((T ph pf  pr)) -> Just(T ( \ k inp -> replaceExpected (norm  ( ph k inp)))                                              ( \ k inp -> replaceExpected (norm  ( pf k inp)))                                              ( \ k inp -> replaceExpected (norm  ( pr k inp))))+        replaceExpected :: Steps a -> Steps a         replaceExpected (Fail _ c) = (Fail [label] c)         replaceExpected others     = others     in P (mkParser nnp  pe) nnp pl pe@@ -430,7 +433,8 @@  applyFail f  = map (\ g -> \ ex -> let (c, l) =  g ex in  (c, f l)) --- | The function @best@ compares two streams and best :: Steps   a -> Steps   a -> Steps   a+-- | The function @best@ compares two streams+best :: Steps a -> Steps a -> Steps a x `best` y =   norm x `best'` norm y  best' :: Steps   b -> Steps   b -> Steps   b@@ -538,6 +542,7 @@          | Infinite          deriving  Show +nat_min :: Nat -> Nat -> Int -> (Nat, Bool) nat_min _          Zero      _  = trace' "Right Zero in nat_min\n"    (Zero, False) nat_min Zero       _         _  = trace' "Left Zero in nat_min\n"     (Zero, True) nat_min Infinite   r         _  = trace' "Left Infinite in nat_min\n" (r,    False) 
src/Text/ParserCombinators/UU/Examples.hs view
@@ -14,6 +14,9 @@ import Text.ParserCombinators.UU.Core import Text.ParserCombinators.UU.BasicInstances import Text.ParserCombinators.UU.Derived+import System.IO+import GHC.IO.Handle.Types+ -- import Control.Monad  -- | The fuction @`run`@ runs the parser and shows both the result, and the correcting steps which were taken during the parsing process.
uu-parsinglib.cabal view
@@ -1,5 +1,5 @@ Name:                uu-parsinglib-Version:             2.5.5+Version:             2.5.5.1 Build-Type:          Simple License:             MIT Copyright:           S Doaitse Swierstra @@ -8,7 +8,7 @@ Maintainer:          Doaitse Swierstra       Stability:           stable, but evolving Homepage:            http://www.cs.uu.nl/wiki/bin/view/HUT/ParserCombinators-Bug-reports:         mailto:doaitse@swierstra.net+Bug-reports:         mailto:doaitse@swierstra.net       Synopsis:            Online, error-correcting parser combinators; monadic and applicative interfaces        Cabal-Version:       >=1.4 Description:         New version of the Utrecht University parser combinator library, which  provides online, error correction, @@ -25,7 +25,8 @@                      .                      The file "Text.ParserCombinators.UU.README" contains some references to background information                      .-Category:            Parsing+                     We maintain a low frequency mailing for discussing the package. You can subscribe at:  https://mail.cs.uu.nl/mailman/listinfo/parsing+Category:            Parsing Text  Library   hs-source-dirs:    src