Copyright  (c) Don Stewart 2007 

License  GPL2 
Maintainer  yidevel@googlegroups.com 
Stability  experimental 
Portability  portable 
Safe Haskell  None 
Language  Haskell2010 
Extensions 

This module defines a common interface for syntaxawareness.
There have been many tens of wasted hours in this and lexer modules. This note is to commemorate those who have fallen in battle.
Synopsis
 data Highlighter cache syntax = SynHL {}
 data Cache state result
 data Scanner st a = Scanner {
 scanInit :: st
 scanLooked :: st > Point
 scanEmpty :: a
 scanRun :: st > [(st, a)]
 data ExtHL syntax = forall cache. ExtHL (Highlighter cache syntax)
 noHighlighter :: Highlighter () syntax
 mkHighlighter :: forall state result. Show state => (Scanner Point Char > Scanner state result) > Highlighter (Cache state result) result
 skipScanner :: Int > Scanner st a > Scanner st a
 emptyFileScan :: Scanner Point Char
 newtype Point = Point {}
 newtype Size = Size {}
 type Length = Int
 type Stroke = Span StyleName
 data Span a = Span {
 spanBegin :: !Point
 spanContents :: !a
 spanEnd :: !Point
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.
SynHL  

Scanner  

forall cache. ExtHL (Highlighter cache syntax) 
noHighlighter :: Highlighter () syntax Source #
mkHighlighter :: forall state result. Show state => (Scanner Point Char > Scanner state result) > Highlighter (Cache state result) result Source #
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 incrementallazy eval.
A point in a buffer
Instances
Size of a buffer region
Instances
Functor Span Source #  
Foldable Span Source #  
Defined in Yi.Syntax fold :: Monoid m => Span m > m # foldMap :: Monoid m => (a > m) > Span a > m # foldMap' :: Monoid m => (a > m) > Span a > m # foldr :: (a > b > b) > b > Span a > b # foldr' :: (a > b > b) > b > Span a > b # foldl :: (b > a > b) > b > Span a > b # foldl' :: (b > a > b) > b > Span a > b # foldr1 :: (a > a > a) > Span a > a # foldl1 :: (a > a > a) > Span a > a # elem :: Eq a => a > Span a > Bool # maximum :: Ord a => Span a > a #  
Traversable Span Source #  
Show a => Show (Span a) Source #  