parsec 3.1.17.0 → 3.1.18.0
raw patch · 7 files changed
+159/−170 lines, 7 filesdep −faildep ~basedep ~bytestringdep ~mtl
Dependencies removed: fail
Dependency ranges changed: base, bytestring, mtl, semigroups
Files
- ChangeLog.md +4/−0
- parsec.cabal +154/−132
- src/Text/Parsec/Char.hs +1/−4
- src/Text/Parsec/Expr.hs +0/−3
- src/Text/Parsec/Perm.hs +0/−15
- src/Text/Parsec/Prim.hs +0/−8
- src/Text/Parsec/Token.hs +0/−8
ChangeLog.md view
@@ -1,3 +1,7 @@+### 3.1.18.0++- Drop support for GHCs prior 8.6.5+ ### 3.1.17.0 - Move `many1 :: ParsecT s u m a -> ParsecT s u m [a]` to `Text.Parsec.Prim`.
parsec.cabal view
@@ -1,157 +1,179 @@-cabal-version: 1.12-name: parsec-version: 3.1.17.0+cabal-version: 1.12+name: parsec+version: 3.1.18.0+synopsis: Monadic parser combinators+description:+ Parsec is designed from scratch as an industrial-strength parser+ library. It is simple, safe, well documented (on the package+ homepage), has extensive libraries, good error messages,+ and is fast. It is defined as a monad transformer that can be+ stacked on arbitrary monads, and it is also parametric in the+ input stream type.+ .+ The main entry point is the "Text.Parsec" module which provides+ defaults for parsing 'Char'acter data.+ .+ The "Text.ParserCombinators.Parsec" module hierarchy contains+ the legacy @parsec-2@ API and may be removed at some point in+ the future. -synopsis: Monadic parser combinators-description: Parsec is designed from scratch as an industrial-strength parser- library. It is simple, safe, well documented (on the package- homepage), has extensive libraries, good error messages,- and is fast. It is defined as a monad transformer that can be- stacked on arbitrary monads, and it is also parametric in the- input stream type.- .- The main entry point is the "Text.Parsec" module which provides- defaults for parsing 'Char'acter data.- .- The "Text.ParserCombinators.Parsec" module hierarchy contains- the legacy @parsec-2@ API and may be removed at some point in- the future.+license: BSD2+license-file: LICENSE+author:+ Daan Leijen <daan@microsoft.com>, Paolo Martini <paolo@nemail.it>, Antoine Latter <aslatter@gmail.com> -license: BSD2-license-file: LICENSE-author: Daan Leijen <daan@microsoft.com>, Paolo Martini <paolo@nemail.it>, Antoine Latter <aslatter@gmail.com>-maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>, Herbert Valerio Riedel <hvr@gnu.org>-homepage: https://github.com/haskell/parsec-bug-reports: https://github.com/haskell/parsec/issues-category: Parsing+maintainer:+ Oleg Grenrus <oleg.grenrus@iki.fi>, Herbert Valerio Riedel <hvr@gnu.org> -build-type: Simple-tested-with: GHC ==9.8.1 || ==9.6.2 || ==9.4.7 || ==9.2.8 || ==9.0.2 || ==8.10.7 || ==8.8.4 || ==8.6.5 || ==8.4.4 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2+homepage: https://github.com/haskell/parsec+bug-reports: https://github.com/haskell/parsec/issues+category: Parsing+build-type: Simple+tested-with:+ GHC ==8.6.5+ || ==8.8.4+ || ==8.10.7+ || ==9.0.2+ || ==9.2.8+ || ==9.4.8+ || ==9.6.4+ || ==9.8.2+ || ==9.10.1+ || ==9.12.1 -extra-source-files: ChangeLog.md, README.md+extra-source-files:+ ChangeLog.md+ README.md source-repository head- type: git- location: https://github.com/haskell/parsec+ type: git+ location: https://github.com/haskell/parsec library- hs-source-dirs: src- exposed-modules:- Text.Parsec- Text.Parsec.String- Text.Parsec.ByteString- Text.Parsec.ByteString.Lazy- Text.Parsec.Text- Text.Parsec.Text.Lazy- Text.Parsec.Pos- Text.Parsec.Error- Text.Parsec.Prim- Text.Parsec.Char- Text.Parsec.Combinator- Text.Parsec.Token- Text.Parsec.Expr- Text.Parsec.Language- Text.Parsec.Perm- Text.ParserCombinators.Parsec- Text.ParserCombinators.Parsec.Char- Text.ParserCombinators.Parsec.Combinator- Text.ParserCombinators.Parsec.Error- Text.ParserCombinators.Parsec.Expr- Text.ParserCombinators.Parsec.Language- Text.ParserCombinators.Parsec.Perm- Text.ParserCombinators.Parsec.Pos- Text.ParserCombinators.Parsec.Prim- Text.ParserCombinators.Parsec.Token+ hs-source-dirs: src+ exposed-modules:+ Text.Parsec+ Text.Parsec.ByteString+ Text.Parsec.ByteString.Lazy+ Text.Parsec.Char+ Text.Parsec.Combinator+ Text.Parsec.Error+ Text.Parsec.Expr+ Text.Parsec.Language+ Text.Parsec.Perm+ Text.Parsec.Pos+ Text.Parsec.Prim+ Text.Parsec.String+ Text.Parsec.Text+ Text.Parsec.Text.Lazy+ Text.Parsec.Token+ Text.ParserCombinators.Parsec+ Text.ParserCombinators.Parsec.Char+ Text.ParserCombinators.Parsec.Combinator+ Text.ParserCombinators.Parsec.Error+ Text.ParserCombinators.Parsec.Expr+ Text.ParserCombinators.Parsec.Language+ Text.ParserCombinators.Parsec.Perm+ Text.ParserCombinators.Parsec.Pos+ Text.ParserCombinators.Parsec.Prim+ Text.ParserCombinators.Parsec.Token - build-depends:- base >= 4.5.1.0 && < 4.20,- mtl >= 2.1.3.1 && < 2.4,- bytestring >= 0.9.2.1 && < 0.13,- text (>= 1.2.3.0 && < 1.3)- || (>= 2.0 && < 2.2)+ build-depends:+ base >=4.12.0.0 && <4.22+ , bytestring >=0.10.8.2 && <0.13+ , mtl >=2.2.2 && <2.4+ , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2 - default-language: Haskell2010- other-extensions:- CPP- DeriveDataTypeable- ExistentialQuantification- FlexibleContexts- FlexibleInstances- FunctionalDependencies- MultiParamTypeClasses- PolymorphicComponents- StandaloneDeriving- Safe- Trustworthy- UndecidableInstances+ default-language: Haskell2010+ other-extensions:+ CPP+ DeriveDataTypeable+ ExistentialQuantification+ FlexibleContexts+ FlexibleInstances+ FunctionalDependencies+ MultiParamTypeClasses+ PolymorphicComponents+ Safe+ StandaloneDeriving+ Trustworthy+ UndecidableInstances - ghc-options: -Wall- if impl(ghc >= 8.0)- ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wno-trustworthy-safe- if impl(ghc < 8.8)- ghc-options: -Wnoncanonical-monadfail-instances- else- -- provide/emulate `Control.Monad.Fail` and `Semigroup` API for pre-GHC8- build-depends: fail == 4.9.*, semigroups >= 0.18 && < 0.21+ ghc-options: -Wall+ ghc-options:+ -Wcompat -Wnoncanonical-monad-instances -Wno-trustworthy-safe - if impl(ghc >= 7.10)- ghc-options: -fno-warn-trustworthy-safe+ if impl(ghc <8.8)+ ghc-options: -Wnoncanonical-monadfail-instances - -- these flags may abort compilation with GHC-8.10- -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295- -- https://gitlab.haskell.org/ghc/ghc/-/issues/22728- -- if impl(ghc >= 9.0)- -- -- ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode+-- these flags may abort compilation with GHC-8.10+-- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295+-- https://gitlab.haskell.org/ghc/ghc/-/issues/22728+-- if impl(ghc >= 9.0)+-- -- ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode test-suite parsec-tests- type: exitcode-stdio-1.0+ type: exitcode-stdio-1.0+ hs-source-dirs: test+ main-is: Main.hs+ other-modules:+ Bugs+ Bugs.Bug2+ Bugs.Bug35+ Bugs.Bug6+ Bugs.Bug9+ Features+ Features.Feature150+ Features.Feature80+ Util - hs-source-dirs: test- main-is: Main.hs- other-modules:- Bugs- Bugs.Bug2- Bugs.Bug6- Bugs.Bug9- Bugs.Bug35- Features- Features.Feature80- Features.Feature150- Util+ build-depends:+ base+ , mtl+ , parsec+ , tasty >=1.4 && <1.6+ , tasty-hunit >=0.10 && <0.11 - build-depends:- base,- mtl,- parsec,- -- dependencies whose version bounds are not inherited via lib:parsec- tasty >= 1.4 && < 1.6,- tasty-hunit >= 0.10 && < 0.11+ -- dependencies whose version bounds are not inherited via lib:parsec+ default-language: Haskell2010+ ghc-options: -Wall - default-language: Haskell2010+ if impl(ghc >=8.0)+ ghc-options:+ -Wcompat -Wnoncanonical-monad-instances+ -Wnoncanonical-monadfail-instances - ghc-options: -Wall- if impl(ghc >= 8.0)- ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances- else- build-depends: semigroups+ else+ build-depends: semigroups test-suite parsec-issue127- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: issue127.hs- hs-source-dirs: test- build-depends: base, parsec+ default-language: Haskell2010+ type: exitcode-stdio-1.0+ main-is: issue127.hs+ hs-source-dirs: test+ build-depends:+ base+ , parsec test-suite parsec-issue171- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: issue171.hs- hs-source-dirs: test- build-depends: base, tasty, tasty-hunit, deepseq, parsec+ default-language: Haskell2010+ type: exitcode-stdio-1.0+ main-is: issue171.hs+ hs-source-dirs: test+ build-depends:+ base+ , deepseq+ , parsec+ , tasty+ , tasty-hunit test-suite parsec-issue175- default-language: Haskell2010- type: exitcode-stdio-1.0- main-is: issue175.hs- hs-source-dirs: test- build-depends: base, tasty, tasty-hunit, parsec+ default-language: Haskell2010+ type: exitcode-stdio-1.0+ main-is: issue175.hs+ hs-source-dirs: test+ build-depends:+ base+ , parsec+ , tasty+ , tasty-hunit
src/Text/Parsec/Char.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, FlexibleContexts, Safe #-}+{-# LANGUAGE FlexibleContexts, Safe #-} ----------------------------------------------------------------------------- -- |@@ -17,9 +17,6 @@ module Text.Parsec.Char where import Data.Char (isSpace, isUpper, isLower, isAlphaNum, isAlpha, isDigit, isHexDigit, isOctDigit)-#if !(MIN_VERSION_base(4,8,0))-import Control.Applicative ((*>))-#endif import Text.Parsec.Pos import Text.Parsec.Prim
src/Text/Parsec/Expr.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE Safe #-} @@ -46,9 +45,7 @@ data Operator s u m a = Infix (ParsecT s u m (a -> a -> a)) Assoc | Prefix (ParsecT s u m (a -> a)) | Postfix (ParsecT s u m (a -> a))-#if MIN_VERSION_base(4,7,0) deriving ( Typeable )-#endif -- | An @OperatorTable s u m a@ is a list of @Operator s u m a@ -- lists. The list is ordered in descending
src/Text/Parsec/Perm.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-}@@ -42,13 +41,7 @@ ) where import Control.Monad.Identity ( Identity )-#if MIN_VERSION_base(4,7,0) import Data.Typeable ( Typeable )-#else--- For GHC 7.6-import Data.Typeable ( Typeable3 )-#endif- import Text.Parsec infixl 1 <||>, <|?>@@ -137,20 +130,12 @@ -- using 'permute'. data StreamPermParser s st a = Perm (Maybe a) [StreamBranch s st a]-#if MIN_VERSION_base(4,7,0) deriving ( Typeable )-#else-deriving instance Typeable3 StreamPermParser-#endif -- type Branch st a = StreamBranch String st a data StreamBranch s st a = forall b. Branch (StreamPermParser s st (b -> a)) (Parsec s st b)-#if MIN_VERSION_base(4,7,0) deriving ( Typeable )-#else-deriving instance Typeable3 StreamBranch-#endif -- | The parser @permute perm@ parses a permutation of parser described -- by @perm@. For example, suppose we want to parse a permutation of:
src/Text/Parsec/Prim.hs view
@@ -149,11 +149,7 @@ -> (ParseError -> m b) -- empty err -> m b }-#if MIN_VERSION_base(4,7,0) deriving ( Typeable )- -- GHC 7.6 doesn't like deriving instances of Typeable for types with- -- non-* type-arguments.-#endif -- | Low-level unpacking of the ParsecT type. To run your parser, please look to -- runPT, runP, runParserT, runParser and other such functions.@@ -222,11 +218,7 @@ -- discarding the first. (<>) = Applicative.liftA2 (Semigroup.<>) -#if MIN_VERSION_base(4,8,0) sconcat = fmap Semigroup.sconcat . sequence-#else- sconcat = fmap (Semigroup.sconcat . NE.fromList) . sequence . NE.toList-#endif stimes b = Semigroup.sconcat . NE.fromList . genericReplicate b -- | The 'Monoid' instance for 'ParsecT' is used for the same purposes as
src/Text/Parsec/Token.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE PolymorphicComponents #-} {-# LANGUAGE Safe #-}@@ -30,9 +28,7 @@ ) where import Data.Char ( isAlpha, toLower, toUpper, isSpace, digitToInt )-#if MIN_VERSION_base(4,7,0) import Data.Typeable ( Typeable )-#endif import Data.List ( nub, sort ) import Control.Monad.Identity (Identity) @@ -107,9 +103,7 @@ caseSensitive :: Bool }-#if MIN_VERSION_base(4,7,0) deriving ( Typeable )-#endif ----------------------------------------------------------- -- A first class module: TokenParser@@ -317,9 +311,7 @@ commaSep1 :: forall a . ParsecT s u m a -> ParsecT s u m [a] }-#if MIN_VERSION_base(4,7,0) deriving ( Typeable )-#endif ----------------------------------------------------------- -- Given a LanguageDef, create a token parser.