hspec-megaparsec 2.0.1 → 2.1.0
raw patch · 5 files changed
+36/−18 lines, 5 filesdep ~basedep ~megaparsec
Dependency ranges changed: base, megaparsec
Files
- CHANGELOG.md +6/−0
- README.md +14/−7
- Test/Hspec/Megaparsec.hs +4/−3
- hspec-megaparsec.cabal +6/−7
- tests/Main.hs +6/−1
CHANGELOG.md view
@@ -1,3 +1,9 @@+## Hspec Megaparsec 2.1.0++* Works with Megaparsec 8.++* Dropped support for GHC 8.2.+ ## Hspec Megaparsec 2.0.1 * Adjusted `shouldParse` to use `shouldBe` from `hspec` under the hood to
README.md view
@@ -6,15 +6,22 @@ [](http://stackage.org/lts/package/hspec-megaparsec) [](https://travis-ci.org/mrkkrp/hspec-megaparsec) -The package is the recommended library for-testing [`Megaparsec`](https://hackage.haskell.org/package/megaparsec)-parsers with with [`Hspec`](https://hackage.haskell.org/package/hspec). As-of Megaparsec 5.1.0, its test suite is re-written with Hspec and this-package with a few ad-hoc helpers.+The package is the recommended library for testing+[`Megaparsec`](https://hackage.haskell.org/package/megaparsec) parsers with+with [`Hspec`](https://hackage.haskell.org/package/hspec). As of Megaparsec+5.1.0, its test suite is re-written with Hspec and this package with a few+ad-hoc helpers. Consult the Haddocks for usage, which should be trivial. Also see test suite-of this package or-[Megaparsec test suite](https://github.com/mrkkrp/megaparsec/tree/master/tests).+of this package or [Megaparsec test+suite](https://github.com/mrkkrp/megaparsec/tree/master/tests).++## Contribution++Issues, bugs, and questions may be reported in [the GitHub issue tracker for+this project](https://github.com/mrkkrp/hspec-megaparsec/issues).++Pull requests are also welcome. ## License
Test/Hspec/Megaparsec.hs view
@@ -184,7 +184,7 @@ , Eq s , Show s )- => (State s, Either (ParseErrorBundle s e) a)+ => (State s e, Either (ParseErrorBundle s e) a) -- ^ Parser that takes stream and produces result along with actual -- state information -> s -- ^ Part of input that should be left unconsumed@@ -210,7 +210,7 @@ , ShowErrorComponent e , Stream s )- => (State s, Either (ParseErrorBundle s e) a)+ => (State s e, Either (ParseErrorBundle s e) a) -- ^ Parser that takes stream and produces result along with actual -- state information -> s -- ^ Part of input that should be left unconsumed@@ -221,11 +221,12 @@ -- | Given input for parsing, construct initial state for parser. -initialState :: s -> State s+initialState :: s -> State s e initialState s = State { stateInput = s , stateOffset = 0 , statePosState = initialPosState s+ , stateParseErrors = [] } -- | Given input for parsing, construct initial positional state.
hspec-megaparsec.cabal view
@@ -1,7 +1,7 @@ name: hspec-megaparsec-version: 2.0.1+version: 2.1.0 cabal-version: 1.18-tested-with: GHC==8.2.2, GHC==8.4.4, GHC==8.6.5+tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1 license: BSD3 license-file: LICENSE.md author: Mark Karpov <markkarpov92@gmail.com>@@ -21,10 +21,10 @@ default: False library- build-depends: base >= 4.10 && < 5.0+ build-depends: base >= 4.11 && < 5.0 , containers >= 0.5 && < 0.7 , hspec-expectations >= 0.8 && < 0.9- , megaparsec >= 7.0 && < 8.0+ , megaparsec >= 8.0 && < 9.0 exposed-modules: Test.Hspec.Megaparsec if flag(dev) ghc-options: -Wall -Werror@@ -35,7 +35,6 @@ -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances- -Wnoncanonical-monadfail-instances default-language: Haskell2010 test-suite tests@@ -46,11 +45,11 @@ ghc-options: -Wall -Werror else ghc-options: -Wall- build-depends: base >= 4.10 && < 5.0+ build-depends: base >= 4.11 && < 5.0 , hspec >= 2.0 && < 3.0 , hspec-expectations >= 0.8 && < 0.9 , hspec-megaparsec- , megaparsec >= 7.0 && < 8.0+ , megaparsec >= 8.0 && < 9.0 default-language: Haskell2010 source-repository head
tests/Main.hs view
@@ -1,11 +1,16 @@+{-# LANGUAGE CPP #-}+ module Main (main) where -import Data.Semigroup ((<>)) import Data.Void import Test.Hspec import Test.Hspec.Megaparsec import Text.Megaparsec import Text.Megaparsec.Char++#if !MIN_VERSION_base(4,13,0)+import Data.Semigroup ((<>))+#endif type Parser = Parsec Void String