HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulescanner-0.3.1Haskell2010

Scanner

Fast not-backtracking incremental scanner for bytestrings

Unlike attoparsec or most of other parser combinator libraries, scanner doesn't support backtracking. But you probably don't need it anyway, at least if you need fast parser.

Scanner processes input incrementally. When more input is needed, scanner returns More continuation. All the already processed input is discarded.

  • 2 types
  • 21 values
  • Packagescanner-0.3.1
  • Exports23
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceScanner.hs
newtypenewtype Scanner a
#

CPS scanner without backtracking

Instances4Monad, Functor, MonadFail, Applicative
valuestring :: ByteString -> Scanner ()
#

Consume the specified string

Warning: it is not optimized yet, so for for small string it is better to consume it byte-by-byte using word8

valuefoldlWhile1 :: (Word8 -> Bool) -> (a -> Word8 -> a) -> a -> Scanner a
#

Fold over the octets, which satisfy the predicate, ensuring that there's at least one