packages feed

scanner 0.3.1 → 0.3.2

raw patch · 5 files changed

+10/−44 lines, 5 filesdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

- Scanner.Internal: Scanner :: (forall r. ByteString -> Next a r -> Result r) -> Scanner a
+ Scanner.Internal: Scanner :: (forall r. () => ByteString -> Next a r -> Result r) -> Scanner a
- Scanner.Internal: [run] :: Scanner a -> forall r. ByteString -> Next a r -> Result r
+ Scanner.Internal: [run] :: Scanner a -> forall r. () => ByteString -> Next a r -> Result r

Files

changelog.md view
@@ -1,3 +1,9 @@+0.3.2++* drop non-caninical definitions for Monad and Applicative, see+https://github.com/Yuras/scanner/pull/15 and+https://github.com/Yuras/scanner/pull/17+ 0.3.1  * support ghc-8.8
− compat/Data/Either.hs
@@ -1,25 +0,0 @@-{-# LANGUAGE PackageImports #-}-{-# LANGUAGE CPP #-}--module Data.Either-(-  module Export,-#if MIN_VERSION_base(4,7,0)-#else-  isRight,-  isLeft,-#endif-)-where--import "base" Data.Either as Export--#if MIN_VERSION_base(4,7,0)-#else-isRight :: Either a b -> Bool-isRight (Right _) = True-isRight _ = False--isLeft :: Either a b -> Bool-isLeft = not . isRight-#endif
compat/Prelude.hs view
@@ -14,11 +14,7 @@ ) where -#if MIN_VERSION_base(4,6,0) import "base" Prelude as P-#else-import "base" Prelude as P hiding (catch)-#endif  #if MIN_VERSION_base(4,8,0) #else
lib/Scanner/Internal.hs view
@@ -46,21 +46,12 @@  instance Applicative Scanner where   {-# INLINE pure #-}-  pure = return+  pure a = Scanner $ \bs next ->+    next bs a   {-# INLINE (<*>) #-}   (<*>) = ap -  {-# INLINE (*>) #-}-  (*>) = (>>)--  {-# INLINE (<*) #-}-  s1 <* s2 = s1 >>= \a -> s2 >> return a- instance Monad Scanner where-  {-# INLINE return #-}-  return a = Scanner $ \bs next ->-    next bs a-   {-# INLINE (>>=) #-}   s1 >>= s2 = Scanner $ \bs next ->     run s1 bs $ \bs' a ->
scanner.cabal view
@@ -1,5 +1,5 @@ name:                scanner-version:             0.3.1+version:             0.3.2 synopsis:            Fast non-backtracking incremental combinator parsing for bytestrings homepage:            https://github.com/Yuras/scanner license:             BSD3@@ -22,9 +22,8 @@   exposed-modules:     Scanner                        Scanner.Internal   other-modules:       Prelude-                       Data.Either                        Scanner.OctetPredicates-  build-depends:       base <5+  build-depends:       base >=4.8 && <5                      , fail                      , bytestring   hs-source-dirs:      lib, compat@@ -40,7 +39,6 @@                      , hspec                      , scanner   other-modules:       Prelude-                       Data.Either   default-language:    Haskell2010  benchmark bench