Safe Haskell | None |
---|---|
Language | Haskell2010 |
Everything in this module is unsafe and can lead to nondeterministic output or segfaults if used incorrectly.
Types
newtype Parser :: forall (r :: RuntimeRep). Type -> Type -> TYPE r -> Type where Source #
A non-resumable parser.
Parser | |
|
Instances
Monad (Parser e s :: Type -> Type) Source # | |
Functor (Parser e s :: Type -> Type) Source # | |
Applicative (Parser e s :: Type -> Type) Source # | |
Defined in Data.Bytes.Parser.Internal | |
Monoid e => Alternative (Parser e s :: Type -> Type) Source # | Combines the error messages using |
Functions
cursor :: Parser e s Int Source #
Get the current offset into the chunk. Using this makes
it possible to observe the internal difference between Bytes
that refer to equivalent slices. Be careful.
expose :: Parser e s ByteArray Source #
Return the byte array being parsed. This includes bytes that preceed the current offset and may include bytes that go beyond the length. This is somewhat dangerous, so only use this is you know what you're doing.