packages feed

fastparser 0.3.1 → 0.3.1.1

raw patch · 3 files changed

+12/−3 lines, 3 filesdep +semigroupsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: semigroups

API changes (from Hackage documentation)

+ ByteString.Parser.Fast: instance GHC.Base.Semigroup ByteString.Parser.Fast.ParseError
- ByteString.Parser.Fast: Parser :: (forall r. ByteString -> (ParseError -> r) -> (ByteString -> a -> r) -> r) -> ParserM a
+ ByteString.Parser.Fast: Parser :: forall r. ByteString -> (ParseError -> r) -> (ByteString -> a -> r) -> r -> ParserM a

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+v0.3.1.1++  * Merged [Typetetris](https://github.com/typetetris) PR, making the package compatible with GHC 8.4++ v0.3.1   * Added the satisfy function
fastparser.cabal view
@@ -1,5 +1,5 @@ name:                fastparser-version:             0.3.1+version:             0.3.1.1 synopsis:            A fast, but bare bones, bytestring parser combinators library. description:         Please see README.md homepage:            https://github.com/bartavelle/fastparser#readme@@ -28,6 +28,8 @@                      , transformers      >= 0.4   ghc-options:         -O2 -Wall   default-language:    Haskell2010+  if !impl(ghc >= 8.0)+    build-depends: semigroups == 0.18.*  source-repository head   type:     git
src/ByteString/Parser/Fast.hs view
@@ -76,7 +76,7 @@ import Data.Thyme import Data.Thyme.Time.Core import Lens.Micro-import Data.Monoid+import Data.Semigroup import qualified Data.ByteString.Lex.Fractional as L import Control.Monad.Codensity (Codensity, lowerCodensity) import Control.Monad.Trans.Class (lift)@@ -132,9 +132,12 @@   , errorExpected   :: !(Set ErrorItem)   } deriving (Show, Eq) +instance Semigroup ParseError where+  (<>) (ParseError u1 e1) (ParseError u2 e2) = ParseError (mappend u1 u2) (mappend e1 e2)+ instance Monoid ParseError where   mempty = ParseError mempty mempty-  mappend (ParseError u1 e1) (ParseError u2 e2) = ParseError (mappend u1 u2) (mappend e1 e2)+  mappend = (<>)  -- | An error representing the unexpected end of input. ueof :: ParseError