packages feed

polyparse 1.12.1 → 1.13

raw patch · 12 files changed

+49/−15 lines, 12 filesdep ~basedep ~bytestringdep ~text

Dependency ranges changed: base, bytestring, text

Files

Changelog.md view
@@ -1,3 +1,8 @@+## 1.13++- GHC-8.8 compatibility+- PolyParse has MonadFail as a superclass.+ ## 1.12.1  - GHC-8.6 compatibility
polyparse.cabal view
@@ -1,5 +1,5 @@ name:           polyparse-version:        1.12.1+version:        1.13 license:        LGPL license-files:   COPYRIGHT, LICENCE-LGPL, LICENCE-commercial copyright:      (c) 2006-2016 Malcolm Wallace@@ -10,7 +10,8 @@ category:       Text, Parsing synopsis:       A variety of alternative parser combinator libraries. description:-        This version, 1.12.1 is a Non-Maintainer Upload (NMU). Report issues to the Hackage Trustees issue tracker.+        This version, 1.13 is a Non-Maintainer Upload (NMU).+        Report issues to the Hackage Trustees issue tracker.         .         A variety of alternative parser combinator libraries, including         the original HuttonMeijer set.  The Poly sets have features like@@ -23,7 +24,8 @@ extra-source-files: Changelog.md  tested-with:-  GHC ==8.6.1+  GHC ==8.8.1+   || ==8.6.5    || ==8.4.4    || ==8.2.2    || ==8.0.2@@ -40,12 +42,12 @@  source-repository this   type:      git-  location:  https://github.com/hackage-/malcolm-wallace-universe.git+  location:  https://github.com/hackage-trustees/malcolm-wallace-universe.git   tag:       1.12.1  library   hs-source-dirs:       src-  build-depends:        base >= 4.3.1.0 && < 4.13+  build-depends:        base >= 4.3.1.0 && < 4.14    if !impl(ghc >= 8.0)      build-depends: fail == 4.9.*
src/Text/ParserCombinators/HuttonMeijer.hs view
@@ -63,7 +63,9 @@    -- >>=         :: Parser a -> (a -> Parser b) -> Parser b    (P p) >>= f     = P (\inp -> concat [papply (f v) out | (v,out) <- p inp]) +#if !MIN_VERSION_base(4,13,0)    fail            = Fail.fail+#endif  instance Fail.MonadFail Parser where    -- fail        :: String -> Parser a
src/Text/ParserCombinators/HuttonMeijerWallace.hs view
@@ -89,7 +89,10 @@                             [ papply' (f v) s out | (v,s,out) <- res ]                         Left err  -> Left err                        )++#if !MIN_VERSION_base(4,13,0)    fail            = Fail.fail+#endif  instance Fail.MonadFail (Parser s t e) where    -- fail        :: String -> Parser s t e a
src/Text/ParserCombinators/Poly/Base.hs view
@@ -26,6 +26,7 @@   ) where  import Control.Applicative+import qualified Control.Monad.Fail as Fail  #ifdef __NHC__ default (Integer,Double,[])	-- hack to avoid bizarre type defaulting error@@ -62,7 +63,7 @@ --   There are two additional basic combinators that we expect to be implemented --   afresh for every concrete type, but which (for technical reasons) --   cannot be class methods.  They are @next@ and @satisfy@.-class (Functor p, Monad p, Applicative p, Alternative p, Commitment p) =>+class (Functor p, Monad p, Fail.MonadFail p, Applicative p, Alternative p, Commitment p) =>       PolyParse p  infixl 3 `apply`@@ -99,7 +100,7 @@ --   An emphasised (severe) error cannot be overridden by choice --   operators. failBad :: PolyParse p => String -> p a-failBad e = commit (fail e)+failBad e = commit (Fail.fail e)  -- | @adjustErrBad@ is just like @adjustErr@ except it also raises the --   severity of the error.@@ -108,7 +109,7 @@  -- | Parse the first alternative in the list that succeeds. oneOf :: PolyParse p => [p a] -> p a-oneOf []     = fail ("failed to parse any of the possible choices")+oneOf []     = Fail.fail ("failed to parse any of the possible choices") oneOf (p:ps) = p <|> oneOf ps --oneOf :: Show t => [Parser t a] -> Parser t a --oneOf []     = do { n <- next
src/Text/ParserCombinators/Poly/ByteString.hs view
@@ -40,12 +40,15 @@  instance Monad Parser where     return       = pure-    fail         = Fail.fail     (P f) >>= g  = P (continue . f)       where         continue (Success ts x)             = let (P g') = g x in g' ts         continue (Committed r)              = Committed (continue r)         continue (Failure ts e)             = Failure ts e++#if !MIN_VERSION_base(4,13,0)+    fail         = Fail.fail+#endif  instance Fail.MonadFail Parser where     fail e       = P (\ts-> Failure ts e)
src/Text/ParserCombinators/Poly/ByteStringChar.hs view
@@ -39,12 +39,15 @@  instance Monad Parser where     return       = pure-    fail         = Fail.fail     (P f) >>= g  = P (continue . f)       where         continue (Success ts x)             = let (P g') = g x in g' ts         continue (Committed r)              = Committed (continue r)         continue (Failure ts e)             = Failure ts e++#if !MIN_VERSION_base(4,13,0)+    fail         = Fail.fail+#endif  instance Fail.MonadFail Parser where     fail e       = P (\ts-> Failure ts e)
src/Text/ParserCombinators/Poly/Lex.hs view
@@ -56,12 +56,15 @@  instance Monad (Parser t) where     return       = pure-    fail         = Fail.fail     (P f) >>= g  = P (continue . f)       where         continue (Success ts x)             = let (P g') = g x in g' ts         continue (Committed r)              = Committed (continue r)         continue (Failure ts e)             = Failure ts e++#if !MIN_VERSION_base(4,13,0)+    fail         = Fail.fail+#endif  instance Fail.MonadFail  (Parser t) where     fail e       = P (\ts-> Failure ts e)
src/Text/ParserCombinators/Poly/Parser.hs view
@@ -40,12 +40,15 @@  instance Monad (Parser t) where     return       = pure-    fail         = Fail.fail     (P f) >>= g  = P (continue . f)       where         continue (Success ts x)             = let (P g') = g x in g' ts         continue (Committed r)              = Committed (continue r)         continue (Failure ts e)             = Failure ts e++#if !MIN_VERSION_base(4,13,0)+    fail         = Fail.fail+#endif  instance Fail.MonadFail (Parser t) where     fail e       = P (\ts-> Failure ts e)
src/Text/ParserCombinators/Poly/StateParser.hs view
@@ -43,12 +43,15 @@  instance Monad (Parser s t) where     return       = pure-    fail         = Fail.fail     (P f) >>= g  = P (\s-> continue . f s)       where         continue (Success (ts,s) x)        = let (P g') = g x in g' s ts         continue (Committed r)             = Committed (continue r)         continue (Failure tss e)           = Failure tss e++#if !MIN_VERSION_base(4,13,0)+    fail         = Fail.fail+#endif  instance Fail.MonadFail (Parser s t) where     fail e       = P (\s ts-> Failure (ts,s) e)
src/Text/ParserCombinators/Poly/StateText.hs view
@@ -46,12 +46,15 @@  instance Monad (Parser s) where     return       = pure-    fail         = Fail.fail     (P f) >>= g  = P (\s-> continue . f s)       where         continue (Success (ts,s) x)         = let (P g') = g x in g' s ts         continue (Committed r)              = Committed (continue r)         continue (Failure ts e)             = Failure ts e++#if !MIN_VERSION_base(4,13,0)+    fail         = Fail.fail+#endif  instance Fail.MonadFail (Parser s) where     fail e       = P (\s ts-> Failure (ts,s) e)
src/Text/ParserCombinators/Poly/Text.hs view
@@ -40,12 +40,15 @@  instance Monad Parser where     return       = pure-    fail         = Fail.fail     (P f) >>= g  = P (continue . f)       where         continue (Success ts x)             = let (P g') = g x in g' ts         continue (Committed r)              = Committed (continue r)         continue (Failure ts e)             = Failure ts e++#if !MIN_VERSION_base(4,13,0)+    fail         = Fail.fail+#endif  instance Fail.MonadFail Parser where     fail e       = P (\ts-> Failure ts e)