|
|
|
| Description |
| This module defines a common interface for syntax-awareness.
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data Highlighter cache syntax | Source |
|
| The main type of syntax highlighters. This record type combines all
the required functions, and is parametrized on the type of the internal
state.
| | Constructors | | SynHL | | | hlStartState :: cache | The start state for the highlighter.
| | hlRun :: Scanner Point Char -> Point -> cache -> cache | | | hlGetTree :: cache -> Int -> syntax | | | hlFocus :: Map Int Region -> cache -> cache | focus at a given point, and return the coresponding node. (hint -- the root can always be returned, at the cost of performance.)
|
|
|
|
|
| data Cache state result | Source |
|
|
|
| Constructors | | Scanner | | | scanInit :: st | Initial state
| | scanLooked :: st -> Point | How far did the scanner look to produce this intermediate state?
The state can be reused as long as nothing changes before that point.
| | scanEmpty :: a | | | scanRun :: st -> [(st, a)] | Running function returns a list of results and intermediate states.
Note: the state is the state before producing the result in the second component.
|
|
| Instances | |
|
|
|
|
|
|
|
|
| This takes as input a scanner that returns the full result at
each element in the list; perhaps in a different form for the
purpose of incremental-lazy eval.
|
|
|
|
|
|
|
| A point in a buffer
| | Constructors | | Instances | |
|
|
|
| Size of a buffer region
| | Constructors | | Instances | |
|
|
|
|
|
|
|
| Constructors | | Span | | | spanBegin :: !Point | | | spanContents :: !a | | | spanEnd :: !Point | |
|
| Instances | |
|
|
| Produced by Haddock version 2.6.1 |