License | BSD-3-Clause |
---|---|
Maintainer | Jamie Willis |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data Input o
- data Input# o = Input# {}
- mkInput :: StaRep o -> (Word, Word) -> Input o
- fromInput :: forall o. DynOps o => Input o -> Input# o
- toInput :: forall o. DynOps o => Word -> Input# o -> Input o
- forcePos :: Input o -> PosSelector -> (Code Int -> Input o -> Code r) -> Code r
- updatePos :: Input o -> Code Char -> CharPred -> Input o
- updateOffset :: Offset o -> Input o -> Input o
- chooseInput :: forall o. DynOps o => InputCharacteristic -> Word -> Input o -> Input# o -> Input o
Documentation
Packages known static information about offsets (via Offset
) with static information about positions
(currently unavailable).
Since: 2.1.0.0
Packages a dynamic offset with a dynamic position.
Since: 1.8.0.0
mkInput :: StaRep o -> (Word, Word) -> Input o Source #
Constructs an Input
given a dynamic offset and a static position.
Since: 2.1.0.0
fromInput :: forall o. DynOps o => Input o -> Input# o Source #
Strips away static information, returning the raw dynamic components.
Since: 1.8.0.0
toInput :: forall o. DynOps o => Word -> Input# o -> Input o Source #
Given a unique identifier, forms a plainly annotated static combination of position and offset.
Since: 1.8.0.0
forcePos :: Input o -> PosSelector -> (Code Int -> Input o -> Code r) -> Code r Source #
Collapse the position stored inside the input applying all updates to it. Once this has been completed,
the given PosSelector
will be used to extract one of the line or column and return it to the given
continuation, along with the updated input post-collapse.
Since: 2.1.0.0
updatePos :: Input o -> Code Char -> CharPred -> Input o Source #
Updates the position within the Input
when a character has been consumed, providing it the
dynamic character that was produced as well as the static character-predicate that guarded it.
Since: 2.1.0.0
chooseInput :: forall o. DynOps o => InputCharacteristic -> Word -> Input o -> Input# o -> Input o Source #
Given knowledge about how input has been consumed through a call boundary, this function can update the input using statically acquired knowledge.
Since: 2.1.0.0