| 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 | |
| ContOps Text16 | |
| ReturnOps Text16 | |
| JoinBuilder Text16 | |
Defined in Parsley.Internal.Backend.Machine.Ops | |
| RecBuilder Text16 | |
Defined in Parsley.Internal.Backend.Machine.Ops Methods buildIter :: ReturnOps Text16 => Ctx s Text16 a -> MVar Void -> Machine s Text16 '[] One Void a -> (Code (Rep Text16) -> Code (Handler s Text16 a)) -> Code (Rep Text16) -> Code (ST s (Maybe a)) # buildRec :: forall (rs :: [Type]) s a r. Regs rs -> Ctx s Text16 a -> Machine s Text16 '[] One r a -> Code (Func rs s Text16 a r) # | |
| LogHandler Text16 | |
| InputPrep Text16 | |
| PositionOps Text16 | |
Defined in Parsley.Internal.Backend.Machine.InputOps | |
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
| Input CharList | |
Defined in Parsley.Internal.Backend.Machine | |
| HandlerOps CharList | |
| ContOps CharList | |
| ReturnOps CharList | |
| JoinBuilder CharList | |
Defined in Parsley.Internal.Backend.Machine.Ops | |
| RecBuilder CharList | |
Defined in Parsley.Internal.Backend.Machine.Ops Methods buildIter :: ReturnOps CharList => Ctx s CharList a -> MVar Void -> Machine s CharList '[] One Void a -> (Code (Rep CharList) -> Code (Handler s CharList a)) -> Code (Rep CharList) -> Code (ST s (Maybe a)) # buildRec :: forall (rs :: [Type]) s a r. Regs rs -> Ctx s CharList a -> Machine s CharList '[] One r a -> Code (Func rs s CharList a r) # | |
| LogHandler CharList | |
| InputPrep CharList | |
| PositionOps CharList | |
Defined in Parsley.Internal.Backend.Machine.InputOps | |
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 | |
| ContOps Stream | |
| ReturnOps Stream | |
| JoinBuilder Stream | |
Defined in Parsley.Internal.Backend.Machine.Ops | |
| RecBuilder Stream | |
Defined in Parsley.Internal.Backend.Machine.Ops Methods buildIter :: ReturnOps Stream => Ctx s Stream a -> MVar Void -> Machine s Stream '[] One Void a -> (Code (Rep Stream) -> Code (Handler s Stream a)) -> Code (Rep Stream) -> Code (ST s (Maybe a)) # buildRec :: forall (rs :: [Type]) s a r. Regs rs -> Ctx s Stream a -> Machine s Stream '[] One r a -> Code (Func rs s Stream a r) # | |
| LogHandler Stream | |
| InputPrep Stream | |
| PositionOps Stream | |
Defined in Parsley.Internal.Backend.Machine.InputOps | |