| License | BSD-3-Clause |
|---|---|
| Maintainer | Jamie Willis |
| Stability | stable |
| Safe Haskell | None |
| Language | Haskell2010 |
Parsley.InputExtras
Description
This module exports the Stream datatype, which can be used as an infinite input to a
parser. It also exports Text16 and CharList, which can be wrapped around
Text and String respectively to force them to be parsed faithfully to their
representation. By default, Strings are converted to character arrays for performance,
but CharList will be uncoverted. On the other hand, Text16 enables a faster, but
potentially less general processing of Text data by assuming all characters
are exactly 16-bits in width.
Since: 0.1.0.0
Documentation
The "end" of a stream, an infinite stream of '\0' (null) characters
Since: parsley-core-0.1.0.0
By wrapping a regular Text input with this newtype, Parsley will assume that all
of the characters fit into exactly one 16-bit chunk. This allows the consumption of
characters in the datatype to be consumed much faster, but does not support multi-word
characters.
Since: parsley-core-0.1.0.0
Instances
| Input Text16 | |
Defined in Parsley.Internal.Backend.Machine | |
| HandlerOps Text16 | |
Defined in Parsley.Internal.Backend.Machine.BindingOps Methods bindHandler# :: StaHandler# s Text16 a -> (DynHandler s Text16 a -> Code b) -> Code b # | |
| JoinBuilder Text16 | |
Defined in Parsley.Internal.Backend.Machine.BindingOps | |
| RecBuilder Text16 | |
Defined in Parsley.Internal.Backend.Machine.BindingOps Methods bindIterHandler# :: (Input# Text16 -> StaHandler# s Text16 a) -> (Code (Pos -> Rep Text16 -> Handler# s Text16 a) -> Code b) -> Code b # bindIter# :: Input# Text16 -> (Code (Pos -> Rep Text16 -> ST s (Maybe a)) -> Input# Text16 -> Code (ST s (Maybe a))) -> Code (ST s (Maybe a)) # bindRec# :: (DynSubroutine s Text16 a x -> StaSubroutine# s Text16 a x) -> DynSubroutine s Text16 a x # | |
| MarshalOps Text16 | |
Defined in Parsley.Internal.Backend.Machine.BindingOps Methods dynHandler# :: StaHandler# s Text16 a -> DynHandler s Text16 a # | |
| InputPrep Text16 | |
By wrapping a regular String with this newtype, Parsley will not preprocess it into
an array of characters, instead using regular pattern matching for the implementation.
Since: parsley-core-0.1.0.0
Instances
An input type that represents an infinite stream of input characters.
Since: parsley-core-0.1.0.0
Instances
| Input Stream | |
Defined in Parsley.Internal.Backend.Machine | |
| HandlerOps Stream | |
Defined in Parsley.Internal.Backend.Machine.BindingOps Methods bindHandler# :: StaHandler# s Stream a -> (DynHandler s Stream a -> Code b) -> Code b # | |
| JoinBuilder Stream | |
Defined in Parsley.Internal.Backend.Machine.BindingOps | |
| RecBuilder Stream | |
Defined in Parsley.Internal.Backend.Machine.BindingOps Methods bindIterHandler# :: (Input# Stream -> StaHandler# s Stream a) -> (Code (Pos -> Rep Stream -> Handler# s Stream a) -> Code b) -> Code b # bindIter# :: Input# Stream -> (Code (Pos -> Rep Stream -> ST s (Maybe a)) -> Input# Stream -> Code (ST s (Maybe a))) -> Code (ST s (Maybe a)) # bindRec# :: (DynSubroutine s Stream a x -> StaSubroutine# s Stream a x) -> DynSubroutine s Stream a x # | |
| MarshalOps Stream | |
Defined in Parsley.Internal.Backend.Machine.BindingOps Methods dynHandler# :: StaHandler# s Stream a -> DynHandler s Stream a # | |
| InputPrep Stream | |
| PositionOps (# Int#, Stream #) | |