License | BSD-3-Clause |
---|---|
Maintainer | Jamie Willis |
Stability | stable |
Safe Haskell | None |
Language | Haskell2010 |
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, String
s 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 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 bindIterHandler# :: (Code (Rep Text16) -> StaHandler# s Text16 a) -> (Code (Rep Text16 -> Handler# s Text16 a) -> Code b) -> Code b # bindIter# :: Code (Rep Text16) -> (DynHandler s Text16 a -> Code (Rep Text16) -> Code (ST s (Maybe a))) -> Code (ST s (Maybe a)) # bindRec# :: (DynSubroutine s Text16 a x -> DynCont s Text16 a x -> Code (Rep Text16) -> DynHandler s Text16 a -> Code (ST s (Maybe a))) -> DynSubroutine s Text16 a x # | |
MarshalOps Text16 | |
Defined in Parsley.Internal.Backend.Machine.BindingOps 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 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 bindIterHandler# :: (Code (Rep Stream) -> StaHandler# s Stream a) -> (Code (Rep Stream -> Handler# s Stream a) -> Code b) -> Code b # bindIter# :: Code (Rep Stream) -> (DynHandler s Stream a -> Code (Rep Stream) -> Code (ST s (Maybe a))) -> Code (ST s (Maybe a)) # bindRec# :: (DynSubroutine s Stream a x -> DynCont s Stream a x -> Code (Rep Stream) -> DynHandler s Stream a -> Code (ST s (Maybe a))) -> DynSubroutine s Stream a x # | |
MarshalOps Stream | |
Defined in Parsley.Internal.Backend.Machine.BindingOps dynHandler# :: StaHandler# s Stream a -> DynHandler s Stream a # | |
InputPrep Stream | |
PositionOps (# Int#, Stream #) | |