CPS scanner without backtracking
Constructors
Scannerrun :: forall r. ByteString -> Next a r -> Result r
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulescanner-0.3.1Haskell2010
Scanner implementation
CPS scanner without backtracking
Scannerrun :: forall r. ByteString -> Next a r -> Result rScanner continuation
Scanner result
Done ByteString rSuccessful result with the rest of input
Fail ByteString StringScanner failed with rest of input and error message
More (ByteString -> Result r)Need more input
Run scanner with the input
Consume the next word
It fails if end of input
Take input while the predicate is True
Take the specified number of bytes
Returns True when there is no more input
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
Return the next byte, if any, without consuming it
Fold over the octets, which satisfy the predicate
Fold over the octets, which satisfy the predicate, ensuring that there's at least one
Consume a single octet which satisfies the predicate and fail if it does not
Consume a single octet in case it satisfies the predicate
Parse a non-negative decimal number in ASCII