License | BSD-3-Clause |
---|---|
Maintainer | Jamie Willis |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module contains the statically refined Offset
type,
which can be used to reason about input in different parts of
a parser as it is evaluated.
Since: 1.4.0.0
Documentation
Augments a regular
with information about its origins and
how much input is known to have been consumed since it came into existence.
This can be used to statically evaluate handlers (see
Code
(Rep
o)staHandlerEval
).
Since: 1.5.0.0
mkOffset :: Code (Rep o) -> Word -> Offset o Source #
Makes a fresh Offset
that has not had any input consumed off of it
yet.
Since: 1.4.0.0
offset :: Offset o -> Code (Rep o) Source #
The underlying code that represents the current offset into the input.
moveOne :: Offset o -> Code (Rep o) -> Offset o Source #
Updates an Offset
with its new underlying representation of a real
runtime offset and records that another character has been consumed.
Since: 1.4.0.0