hw-string-parse 0.0.0.4 → 0.0.0.5
raw patch · 4 files changed
+66/−26 lines, 4 filesdep +doctestdep +doctest-discoverdep ~QuickCheckdep ~basedep ~bytestringPVP ok
version bump matches the API change (PVP)
Dependencies added: doctest, doctest-discover
Dependency ranges changed: QuickCheck, base, bytestring, hspec, vector
API changes (from Hackage documentation)
Files
- README.md +2/−1
- doctest/DoctestDriver.hs +12/−0
- hw-string-parse.cabal +51/−23
- src/HaskellWorks/Data/String/Parse.hs +1/−2
README.md view
@@ -1,4 +1,5 @@ # hw-string-parse-[](https://circleci.com/gh/haskell-works/hw-string-parse/tree/0-branch)++[](https://circleci.com/gh/haskell-works/hw-string-parse) Simple parser combinator library for strings.
+ doctest/DoctestDriver.hs view
@@ -0,0 +1,12 @@+{-# LANGUAGE CPP #-}++#if MIN_VERSION_GLASGOW_HASKELL(8,4,4,0)+{-# OPTIONS_GHC -F -pgmF doctest-discover #-}+#else+module Main where++import qualified System.IO as IO++main :: IO ()+main = IO.putStrLn "WARNING: doctest will not run on GHC versions earlier than 8.4.4"+#endif
hw-string-parse.cabal view
@@ -1,41 +1,69 @@+cabal-version: 2.2+ name: hw-string-parse-version: 0.0.0.4+version: 0.0.0.5 synopsis: String parser description: Please see README.md+category: Data, Bit+stability: Experimental homepage: http://github.com/haskell-works/hw-string-parse#readme-license: BSD3-license-file: LICENSE+bug-reports: https://github.com/haskell-works/hw-string-parse/issues author: John Ky maintainer: newhoggy@gmail.com-copyright: 2016 John Ky-category: Data, Bit-stability: Experimental+copyright: 2016-2021 John Ky+license: BSD-3-Clause+license-file: LICENSE+tested-with: GHC == 9.2.2, GHC == 9.0.2, GHC == 8.10.7, GHC == 8.8.4, GHC == 8.6.5 build-type: Simple extra-source-files: README.md-cabal-version: >= 1.22 -library- hs-source-dirs: src- exposed-modules: HaskellWorks.Data.String.Parse- build-depends: base >= 4 && < 5+source-repository head+ type: git+ location: https://github.com/haskell-works/hw-string-parse +common base { build-depends: base >= 4.11 && < 5 }++common doctest { build-depends: doctest >= 0.16.2 && < 0.21 }+common doctest-discover { build-depends: doctest-discover >= 0.2 && < 0.3 }+common QuickCheck { build-depends: QuickCheck }+common bytestring { build-depends: bytestring }+common hspec { build-depends: hspec }+common vector { build-depends: vector }++common config default-language: Haskell2010++common hw-string-parse+ build-depends: hw-string-parse++library+ import: base, config+ exposed-modules: HaskellWorks.Data.String.Parse+ other-modules: Paths_hw_string_parse+ autogen-modules: Paths_hw_string_parse+ hs-source-dirs: src ghc-options: -Wall -O2 -msse4.2 test-suite hw-string-parse-test- type: exitcode-stdio-1.0- hs-source-dirs: test- main-is: Spec.hs- other-modules:- build-depends: base >= 4 && < 5+ import: base, config+ , QuickCheck , bytestring , hspec- , hw-string-parse- , QuickCheck , vector- ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall- default-language: Haskell2010+ type: exitcode-stdio-1.0+ main-is: Spec.hs+ hs-source-dirs: test+ ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N+ build-tool-depends: hspec-discover:hspec-discover+ build-depends: hw-string-parse -source-repository head- type: git- location: https://github.com/haskell-works/hw-string-parse+test-suite doctest+ import: base, config+ , doctest+ , doctest-discover+ , hw-string-parse+ type: exitcode-stdio-1.0+ ghc-options: -threaded -rtsopts -with-rtsopts=-N+ main-is: DoctestDriver.hs+ HS-Source-Dirs: doctest+ build-tool-depends: doctest-discover:doctest-discover
src/HaskellWorks/Data/String/Parse.hs view
@@ -28,11 +28,10 @@ fmap f (Parser cs) = Parser (\s -> [(f a, b) | (a, b) <- cs s]) instance Applicative Parser where- pure = return+ pure = unit (Parser cs1) <*> (Parser cs2) = Parser (\s -> [(f a, s2) | (f, s1) <- cs1 s, (a, s2) <- cs2 s1]) instance Monad Parser where- return = unit (>>=) = bind instance MonadPlus Parser where