This file is indexed.

/usr/share/doc/libghc-yi-language-doc/html/yi-language.txt is in libghc-yi-language-doc 0.2.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Collection of language-related Yi libraries.
--   
--   Collection of language-related Yi libraries: lexers, scanners…
@package yi-language
@version 0.2.0


-- | Colors and friends.
module Yi.Style

-- | Visual text attributes to be applied during layout.
data Attributes
Attributes :: !Color -> !Color -> !Bool -> !Bool -> !Bool -> !Bool -> Attributes
[foreground] :: Attributes -> !Color
[background] :: Attributes -> !Color

-- | The text should be show as "active" or "selected". This can be
--   implemented by reverse video on the terminal.
[reverseAttr] :: Attributes -> !Bool
[bold] :: Attributes -> !Bool
[italic] :: Attributes -> !Bool
[underline] :: Attributes -> !Bool
emptyAttributes :: Attributes

-- | The style is used to transform attributes by modifying one or more of
--   the visual text attributes.
type Style = Endo Attributes

-- | The UI type
data UIStyle
UIStyle :: Attributes -> Style -> Attributes -> Style -> Style -> Attributes -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> Style -> UIStyle

-- | ground attributes for the modeline
[modelineAttributes] :: UIStyle -> Attributes

-- | transformation of modeline in focus
[modelineFocusStyle] :: UIStyle -> Style

-- | ground attributes for the tabbar
[tabBarAttributes] :: UIStyle -> Attributes

-- | a tab that currently holds the focus
[tabInFocusStyle] :: UIStyle -> Style

-- | a tab that does not have the current focus
[tabNotFocusedStyle] :: UIStyle -> Style

-- | ground attributes for the main text views
[baseAttributes] :: UIStyle -> Attributes

-- | the selected portion
[selectedStyle] :: UIStyle -> Style

-- | empty file marker colours
[eofStyle] :: UIStyle -> Style

-- | indicates errors in text
[errorStyle] :: UIStyle -> Style

-- | search matches<i>paren matches</i>other hints
[hintStyle] :: UIStyle -> Style

-- | current search match
[strongHintStyle] :: UIStyle -> Style

-- | all comments
[commentStyle] :: UIStyle -> Style

-- | additional only for block comments
[blockCommentStyle] :: UIStyle -> Style

-- | applied to language keywords
[keywordStyle] :: UIStyle -> Style

-- | numbers
[numberStyle] :: UIStyle -> Style

-- | preprocessor directive (often in Haskell or C)
[preprocessorStyle] :: UIStyle -> Style

-- | constant strings
[stringStyle] :: UIStyle -> Style

-- | additional style for long strings
[longStringStyle] :: UIStyle -> Style

-- | type name (such as class in an OO language)
[typeStyle] :: UIStyle -> Style

-- | data constructor
[dataConstructorStyle] :: UIStyle -> Style

-- | style of import names
[importStyle] :: UIStyle -> Style

-- | builtin things, e.g. Array in JavaScript
[builtinStyle] :: UIStyle -> Style

-- | regular expressions
[regexStyle] :: UIStyle -> Style

-- | any standard variable (identifier)
[variableStyle] :: UIStyle -> Style

-- | infix operators
[operatorStyle] :: UIStyle -> Style

-- | Style of a quotation (e.g. in template haskell)
[quoteStyle] :: UIStyle -> Style

-- | stuff that's passed to the shell in a Makefile
[makeFileAction] :: UIStyle -> Style

-- | makefile rule headers
[makeFileRuleHead] :: UIStyle -> Style

-- | A StyleName determines what style to use, taking into account the set
--   of rendering preferences given by a <a>UIStyle</a>. Typically, style
--   names will be <a>Style</a>-valued field names of <a>UIStyle</a>.
type StyleName = UIStyle -> Style

-- | A style that sets the foreground.
withFg :: Color -> Style

-- | A style that sets the background.
withBg :: Color -> Style

-- | A style that sets the font to bold
withBd :: Bool -> Style

-- | A style that sets the style to italics
withItlc :: Bool -> Style

-- | A style that sets the style to underlined
withUnderline :: Bool -> Style

-- | A style that sets the style to underlined
withReverse :: Bool -> Style

-- | The identity transform.
defaultStyle :: StyleName
data Color
RGB :: {-# UNPACK #-} !Word8 -> {-# UNPACK #-} !Word8 -> {-# UNPACK #-} !Word8 -> Color

-- | The system-default color of the engine used. e.g. in Gtk this should
--   pick whatever the user has chosen as default color (background or
--   forground depending on usage) for the text.
Default :: Color

-- | Convert a color to its text specification, as to be accepted by
--   XParseColor
colorToText :: Color -> String
black :: Color
grey :: Color
lightGrey :: Color
darkred :: Color
red :: Color
darkgreen :: Color
green :: Color
brown :: Color
yellow :: Color
darkblue :: Color
blue :: Color
purple :: Color
magenta :: Color
darkcyan :: Color
cyan :: Color
white :: Color
brightwhite :: Color
instance GHC.Show.Show Yi.Style.Attributes
instance GHC.Classes.Ord Yi.Style.Attributes
instance GHC.Classes.Eq Yi.Style.Attributes
instance GHC.Show.Show Yi.Style.Color
instance GHC.Classes.Ord Yi.Style.Color
instance GHC.Classes.Eq Yi.Style.Color

module Yi.Style.Library
type Theme = Proto UIStyle

-- | Abstract theme that provides useful defaults.
defaultTheme :: Theme

-- | A Theme inspired by the darkblue colorscheme of Vim.
darkBlueTheme :: Theme


-- | Various utility functions and instances used throughout Yi. Some of
--   the functions from the now-removed Yi.Prelude found a new home here.
module Yi.Utils
io :: MonadBase IO m => IO a -> m a
fst3 :: (a, b, c) -> a
snd3 :: (a, b, c) -> b
trd3 :: (a, b, c) -> c
class SemiNum absolute relative | absolute -> relative
(+~) :: SemiNum absolute relative => absolute -> relative -> absolute
(-~) :: SemiNum absolute relative => absolute -> relative -> absolute
(~-) :: SemiNum absolute relative => absolute -> absolute -> relative

-- | As <a>nub</a>, but with O(n*log(n)) behaviour.
nubSet :: (Ord a) => [a] -> [a]

-- | As Map.adjust, but the combining function is applied strictly.
mapAdjust' :: (Ord k) => (a -> a) -> k -> Map k a -> Map k a

-- | Generalisation of <a>fromList</a> to arbitrary foldables.
mapFromFoldable :: (Foldable t, Ord k) => t (k, a) -> Map k a

-- | Alternative to groupBy.
--   
--   <pre>
--   groupBy' (\a b -&gt; abs (a - b) &lt;= 1) [1,2,3] = [[1,2,3]]
--   </pre>
--   
--   whereas
--   
--   <pre>
--   groupBy (\a b -&gt; abs (a - b) &lt;= 1) [1,2,3] = [[1,2],[3]]
--   </pre>
--   
--   TODO: Check in ghc 6.12 release if groupBy == groupBy'.
groupBy' :: (a -> a -> Bool) -> [a] -> [[a]]
chain :: (a -> a -> Bool) -> [a] -> ([a], [a])

-- | Return the longest common prefix of a set of lists.
--   
--   <pre>
--   P(xs) === all (isPrefixOf (commonPrefix xs)) xs
--   length s &gt; length (commonPrefix xs) --&gt; not (all (isPrefixOf s) xs)
--   </pre>
commonPrefix :: Eq a => [[a]] -> [a]

-- | Finds the first element satisfying the predicate, and returns a zipper
--   pointing at it.
findPL :: (a -> Bool) -> [a] -> Maybe (PointedList a)

-- | Given a function which moves the focus from index A to index B, return
--   a function which swaps the elements at indexes A and B and then moves
--   the focus. See Yi.Editor.swapWinWithFirstE for an example.
swapFocus :: (PointedList a -> PointedList a) -> (PointedList a -> PointedList a)
makeClassyWithSuffix :: String -> Name -> Q [Dec]
addSuffix :: Name -> String -> [DefName]
makeLensesWithSuffix :: String -> Name -> Q [Dec]
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k, Data.Binary.Class.Binary k, Data.Binary.Class.Binary v) => Data.Binary.Class.Binary (Data.HashMap.Base.HashMap k v)


-- | Basic types useful everywhere we play with buffers.
module Yi.Buffer.Basic

-- | Direction of movement inside a buffer
data Direction
Backward :: Direction
Forward :: Direction
reverseDir :: Direction -> Direction

-- | reverse if Backward
mayReverse :: Direction -> [a] -> [a]

-- | <tt>direction</tt> is in the same style of <a>maybe</a> or
--   <a>either</a> functions, It takes one argument per direction
--   (backward, then forward) and a direction to select the output.
directionElim :: Direction -> a -> a -> a

-- | A mark in a buffer
newtype Mark
Mark :: Int -> Mark
[markId] :: Mark -> Int

-- | Reference to a buffer.
newtype BufferRef
BufferRef :: Int -> BufferRef

-- | A point in a buffer
newtype Point
Point :: Int -> Point
[fromPoint] :: Point -> Int

-- | Size of a buffer region
newtype Size
Size :: Int -> Size
[fromSize] :: Size -> Int

-- | Window references
newtype WindowRef
WindowRef :: Int -> WindowRef
[unWindowRef] :: WindowRef -> Int
instance GHC.Generics.Constructor Yi.Buffer.Basic.C1_1Direction
instance GHC.Generics.Constructor Yi.Buffer.Basic.C1_0Direction
instance GHC.Generics.Datatype Yi.Buffer.Basic.D1Direction
instance Data.Binary.Class.Binary Yi.Buffer.Basic.WindowRef
instance GHC.Show.Show Yi.Buffer.Basic.WindowRef
instance GHC.Enum.Enum Yi.Buffer.Basic.WindowRef
instance GHC.Classes.Ord Yi.Buffer.Basic.WindowRef
instance GHC.Classes.Eq Yi.Buffer.Basic.WindowRef
instance Data.Binary.Class.Binary Yi.Buffer.Basic.Size
instance GHC.Real.Integral Yi.Buffer.Basic.Size
instance GHC.Real.Real Yi.Buffer.Basic.Size
instance GHC.Enum.Enum Yi.Buffer.Basic.Size
instance GHC.Num.Num Yi.Buffer.Basic.Size
instance GHC.Classes.Ord Yi.Buffer.Basic.Size
instance GHC.Classes.Eq Yi.Buffer.Basic.Size
instance GHC.Show.Show Yi.Buffer.Basic.Size
instance GHC.Real.Integral Yi.Buffer.Basic.Point
instance GHC.Real.Real Yi.Buffer.Basic.Point
instance GHC.Num.Num Yi.Buffer.Basic.Point
instance GHC.Arr.Ix Yi.Buffer.Basic.Point
instance Data.Binary.Class.Binary Yi.Buffer.Basic.Point
instance GHC.Enum.Bounded Yi.Buffer.Basic.Point
instance GHC.Enum.Enum Yi.Buffer.Basic.Point
instance GHC.Classes.Ord Yi.Buffer.Basic.Point
instance GHC.Classes.Eq Yi.Buffer.Basic.Point
instance GHC.Num.Num Yi.Buffer.Basic.BufferRef
instance Data.Binary.Class.Binary Yi.Buffer.Basic.BufferRef
instance GHC.Classes.Ord Yi.Buffer.Basic.BufferRef
instance GHC.Classes.Eq Yi.Buffer.Basic.BufferRef
instance Data.Binary.Class.Binary Yi.Buffer.Basic.Mark
instance GHC.Show.Show Yi.Buffer.Basic.Mark
instance GHC.Classes.Ord Yi.Buffer.Basic.Mark
instance GHC.Classes.Eq Yi.Buffer.Basic.Mark
instance GHC.Generics.Generic Yi.Buffer.Basic.Direction
instance GHC.Enum.Enum Yi.Buffer.Basic.Direction
instance GHC.Enum.Bounded Yi.Buffer.Basic.Direction
instance GHC.Show.Show Yi.Buffer.Basic.Direction
instance GHC.Classes.Ord Yi.Buffer.Basic.Direction
instance GHC.Classes.Eq Yi.Buffer.Basic.Direction
instance Data.Binary.Class.Binary Yi.Buffer.Basic.Direction
instance GHC.Show.Show Yi.Buffer.Basic.BufferRef
instance GHC.Show.Show Yi.Buffer.Basic.Point
instance Yi.Utils.SemiNum Yi.Buffer.Basic.Point Yi.Buffer.Basic.Size
instance Data.Default.Class.Default Yi.Buffer.Basic.WindowRef

module Yi.Regex
data SearchOption

-- | Compile for matching that ignores char case
IgnoreCase :: SearchOption

-- | Compile for newline-insensitive matching
NoNewLine :: SearchOption

-- | Treat the input not as a regex but as a literal string to search for.
QuoteRegex :: SearchOption
makeSearchOptsM :: [SearchOption] -> String -> Either String SearchExp
data SearchExp
SearchExp :: String -> Regex -> Regex -> [SearchOption] -> SearchExp
[seInput] :: SearchExp -> String
[seCompiled] :: SearchExp -> Regex
[seBackCompiled] :: SearchExp -> Regex
[seOptions] :: SearchExp -> [SearchOption]
searchString :: SearchExp -> String
searchRegex :: Direction -> SearchExp -> Regex
emptySearch :: SearchExp

-- | The regular expression that matches nothing.
emptyRegex :: Regex

-- | Return an escaped (for parseRegex use) version of the string.
regexEscapeString :: String -> String
instance GHC.Generics.Constructor Yi.Regex.C1_2SearchOption
instance GHC.Generics.Constructor Yi.Regex.C1_1SearchOption
instance GHC.Generics.Constructor Yi.Regex.C1_0SearchOption
instance GHC.Generics.Datatype Yi.Regex.D1SearchOption
instance GHC.Generics.Generic Yi.Regex.SearchOption
instance GHC.Classes.Eq Yi.Regex.SearchOption
instance Data.Binary.Class.Binary Yi.Regex.SearchOption
instance Data.Binary.Class.Binary Yi.Regex.SearchExp
instance Control.Lens.Plated.Plated Text.Regex.TDFA.Pattern.Pattern


-- | This module defines the Region ADT
module Yi.Region

-- | The region data type. The region is semi open: it includes the start
--   but not the end bound. This allows simpler region-manipulation
--   algorithms. Invariant : regionStart r &lt;= regionEnd r
data Region

-- | The empty region
emptyRegion :: Region
regionIsEmpty :: Region -> Bool

-- | Construct a region from its bounds, emacs style: the right bound is
--   excluded
mkRegion :: Point -> Point -> Region
mkRegion' :: Direction -> Point -> Point -> Region
mkSizeRegion :: Point -> Size -> Region
regionStart :: Region -> Point
regionEnd :: Region -> Point
regionSize :: Region -> Size
regionDirection :: Region -> Direction

-- | True if the given point is inside the given region.
inRegion :: Point -> Region -> Bool

-- | True if the given point is inside the given region or at the end of
--   it.
nearRegion :: Point -> Region -> Bool

-- | Returns if a region (1st arg) is included in another (2nd arg)
includedRegion :: Region -> Region -> Bool
fmapRegion :: (Point -> Point) -> Region -> Region

-- | Take the intersection of two regions
intersectRegion :: Region -> Region -> Region

-- | Take the union of two regions (including what is between them)
unionRegion :: Region -> Region -> Region
regionFirst :: Region -> Point
regionLast :: Region -> Point
regionsOverlap :: Bool -> Region -> Region -> Bool
instance GHC.Generics.Selector Yi.Region.S1_0_2Region
instance GHC.Generics.Selector Yi.Region.S1_0_1Region
instance GHC.Generics.Selector Yi.Region.S1_0_0Region
instance GHC.Generics.Constructor Yi.Region.C1_0Region
instance GHC.Generics.Datatype Yi.Region.D1Region
instance GHC.Generics.Generic Yi.Region.Region
instance Data.Binary.Class.Binary Yi.Region.Region
instance GHC.Show.Show Yi.Region.Region


-- | This module defines a common interface for syntax-awareness.
--   
--   There have been many tens of wasted hours in this and lexer modules.
--   This note is to commemorate those who have fallen in battle.
module Yi.Syntax

-- | The main type of syntax highlighters. This record type combines all
--   the required functions, and is parametrized on the type of the
--   internal state.
data Highlighter cache syntax
SynHL :: cache -> (Scanner Point Char -> Point -> cache -> cache) -> (cache -> WindowRef -> syntax) -> (Map WindowRef Region -> cache -> cache) -> Highlighter cache syntax

-- | The start state for the highlighter.
[hlStartState] :: Highlighter cache syntax -> cache
[hlRun] :: Highlighter cache syntax -> Scanner Point Char -> Point -> cache -> cache
[hlGetTree] :: Highlighter cache syntax -> cache -> WindowRef -> syntax

-- | focus at a given point, and return the coresponding node. (hint -- the
--   root can always be returned, at the cost of performance.)
[hlFocus] :: Highlighter cache syntax -> Map WindowRef Region -> cache -> cache
data Cache state result
data Scanner st a
Scanner :: st -> (st -> Point) -> a -> (st -> [(st, a)]) -> Scanner st a

-- | Initial state
[scanInit] :: Scanner st a -> st

-- | How far did the scanner look to produce this intermediate state? The
--   state can be reused as long as nothing changes before that point.
[scanLooked] :: Scanner st a -> st -> Point
[scanEmpty] :: Scanner st a -> a

-- | Running function returns a list of results and intermediate states.
--   Note: the state is the state <i>before</i> producing the result in the
--   second component.
[scanRun] :: Scanner st a -> st -> [(st, a)]
data ExtHL syntax
ExtHL :: (Highlighter cache syntax) -> ExtHL syntax
noHighlighter :: Highlighter () syntax

-- | 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.
mkHighlighter :: 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

-- | A point in a buffer
newtype Point
Point :: Int -> Point
[fromPoint] :: Point -> Int

-- | Size of a buffer region
newtype Size
Size :: Int -> Size
[fromSize] :: Size -> Int
type Length = Int
type Stroke = Span StyleName
data Span a
Span :: !Point -> !a -> !Point -> Span a
[spanBegin] :: Span a -> !Point
[spanContents] :: Span a -> !a
[spanEnd] :: Span a -> !Point
instance Data.Traversable.Traversable Yi.Syntax.Span
instance Data.Foldable.Foldable Yi.Syntax.Span
instance GHC.Base.Functor Yi.Syntax.Span
instance GHC.Show.Show a => GHC.Show.Show (Yi.Syntax.Span a)
instance GHC.Base.Functor (Yi.Syntax.Scanner st)


-- | Utilities to turn a lexer generated by Alex into a <a>Scanner</a> that
--   can be used by Yi. Most lexers will use the types defined here. Some
--   things are exported for use by lexers themselves through the use of
--   <tt>Yi<i>Lexers</i>common.hsinc</tt>.
module Yi.Lexer.Alex

-- | Encode a Haskell String to a list of Word8 values, in UTF8 format.
utf8Encode :: Char -> [Word8]
type Byte = Word8
type IndexedStr = [(Point, Char)]
type AlexInput = (Char, [Byte], IndexedStr)
type Action hlState token = IndexedStr -> hlState -> (hlState, token)

-- | Lexer state
data AlexState lexerState
AlexState :: lexerState -> !Point -> !Posn -> AlexState lexerState
[stLexer] :: AlexState lexerState -> lexerState
[lookedOffset] :: AlexState lexerState -> !Point
[stPosn] :: AlexState lexerState -> !Posn
data Tok t
Tok :: t -> Size -> Posn -> Tok t
[tokT] :: Tok t -> t
[tokLen] :: Tok t -> Size
[tokPosn] :: Tok t -> Posn
tokToSpan :: Tok t -> Span t
tokFromT :: t -> Tok t
tokBegin :: Tok t -> Point
tokEnd :: Tok t -> Point
data Posn
Posn :: !Point -> !Int -> !Int -> Posn
[posnOfs] :: Posn -> !Point
[posnLine] :: Posn -> !Int
[posnCol] :: Posn -> !Int
startPosn :: Posn
moveStr :: Posn -> IndexedStr -> Posn
moveCh :: Posn -> Char -> Posn
alexGetChar :: AlexInput -> Maybe (Char, AlexInput)
alexGetByte :: AlexInput -> Maybe (Word8, AlexInput)
alexCollectChar :: AlexInput -> [Char]
alexInputPrevChar :: AlexInput -> Char

-- | Return a constant token
actionConst :: token -> Action lexState token

-- | Return a constant token, and modify the lexer state
actionAndModify :: (lexState -> lexState) -> token -> Action lexState token

-- | Convert the parsed string into a token, and also modify the lexer
--   state
actionStringAndModify :: (s -> s) -> (String -> token) -> Action s token

-- | Convert the parsed string into a token
actionStringConst :: (String -> token) -> Action lexState token
type ASI s = (AlexState s, AlexInput)

-- | Function to (possibly) lex a single token and give us the remaining
--   input.
type TokenLexer l s t i = (l s, i) -> Maybe (t, (l s, i))

-- | Handy alias
type CharScanner = Scanner Point Char

-- | Generalises lexers. This allows us to easily use lexers which don't
--   want to be cornered into the types we have predefined here and use in
--   <tt>common.hsinc</tt>.
data Lexer l s t i
Lexer :: TokenLexer l s t i -> (s -> Point -> Posn -> l s) -> (Char -> [(Point, Char)] -> i) -> (l s -> Point) -> (l s -> Posn) -> t -> s -> Lexer l s t i
[_step] :: Lexer l s t i -> TokenLexer l s t i
[_starting] :: Lexer l s t i -> s -> Point -> Posn -> l s
[_withChars] :: Lexer l s t i -> Char -> [(Point, Char)] -> i
[_looked] :: Lexer l s t i -> l s -> Point
[_statePosn] :: Lexer l s t i -> l s -> Posn
[_lexEmpty] :: Lexer l s t i -> t
[_startingState] :: Lexer l s t i -> s

-- | Just like <a>Lexer</a> but also knows how to turn its tokens into
--   <a>StyleName</a>s.
data StyleLexer l s t i
StyleLexer :: (t -> StyleName) -> Lexer l s (Tok t) i -> StyleLexer l s t i
[_tokenToStyle] :: StyleLexer l s t i -> t -> StyleName
[_styleLexer] :: StyleLexer l s t i -> Lexer l s (Tok t) i

-- | <a>StyleLexer</a> over <a>ASI</a>.
type StyleLexerASI s t = StyleLexer AlexState s t AlexInput

-- | Defines a <a>Lexer</a> for <a>ASI</a>. This exists to make using the
--   new <a>lexScanner</a> easier if you're using <a>ASI</a> as all our
--   lexers do today, 23-08-2014.
commonLexer :: (ASI s -> Maybe (Tok t, ASI s)) -> s -> Lexer AlexState s (Tok t) AlexInput

-- | Combine a character scanner with a lexer to produce a token scanner.
--   May be used together with <tt>mkHighlighter</tt> to produce a
--   <a>Highlighter</a>, or with <tt>linearSyntaxMode</tt> to produce a
--   <tt>Mode</tt>.
lexScanner :: Lexer l s t i -> CharScanner -> Scanner (l s) t

-- | unfold lexer into a function that returns a stream of (state, token)
unfoldLexer :: ((state, input) -> Maybe (token, (state, input))) -> (state, input) -> [(state, token)]
posnOfsA :: Lens' Posn Point
posnLineA :: Lens' Posn Int
posnColA :: Lens' Posn Int
tokTA :: Lens' (Tok t_aKD2) t_aKD2
tokPosnA :: Lens' (Tok t_aKD2) Posn
tokLenA :: Lens' (Tok t_aKD2) Size
withChars :: Lens' (Lexer l_aKCT s_aKCU t_aKCV i_aKCW) (Char -> [(Point, Char)] -> i_aKCW)
step :: Lens' (Lexer l_aKCT s_aKCU t_aKCV i_aKCW) (TokenLexer l_aKCT s_aKCU t_aKCV i_aKCW)
statePosn :: Lens' (Lexer l_aKCT s_aKCU t_aKCV i_aKCW) (l_aKCT s_aKCU -> Posn)
startingState :: Lens' (Lexer l_aKCT s_aKCU t_aKCV i_aKCW) s_aKCU
starting :: Lens' (Lexer l_aKCT s_aKCU t_aKCV i_aKCW) (s_aKCU -> Point -> Posn -> l_aKCT s_aKCU)
looked :: Lens' (Lexer l_aKCT s_aKCU t_aKCV i_aKCW) (l_aKCT s_aKCU -> Point)
lexEmpty :: Lens' (Lexer l_aKCT s_aKCU t_aKCV i_aKCW) t_aKCV
tokenToStyle :: Lens' (StyleLexer l_aKCP s_aKCQ t_aKCR i_aKCS) (t_aKCR -> StyleName)
styleLexer :: Lens (StyleLexer l_aKCP s_aKCQ t_aKCR i_aKCS) (StyleLexer l_aL8F s_aL8G t_aKCR i_aL8H) (Lexer l_aKCP s_aKCQ (Tok t_aKCR) i_aKCS) (Lexer l_aL8F s_aL8G (Tok t_aKCR) i_aL8H)
(+~) :: SemiNum absolute relative => absolute -> relative -> absolute
(~-) :: SemiNum absolute relative => absolute -> absolute -> relative

-- | Size of a buffer region
newtype Size
Size :: Int -> Size
[fromSize] :: Size -> Int
type Stroke = Span StyleName
instance GHC.Show.Show lexerState => GHC.Show.Show (Yi.Lexer.Alex.AlexState lexerState)
instance GHC.Base.Functor Yi.Lexer.Alex.Tok
instance GHC.Arr.Ix Yi.Lexer.Alex.Posn
instance GHC.Classes.Eq Yi.Lexer.Alex.Posn
instance GHC.Classes.Eq (Yi.Lexer.Alex.Tok a)
instance GHC.Show.Show t => GHC.Show.Show (Yi.Lexer.Alex.Tok t)
instance GHC.Classes.Ord Yi.Lexer.Alex.Posn
instance GHC.Show.Show Yi.Lexer.Alex.Posn

module Yi.Lexer.Abella
lexer :: StyleLexerASI HlState Token
tokenToText :: Token -> Maybe String
type TT = Tok Token
isComment :: Token -> Bool
data Token
Number :: Token
VarIdent :: Token
ConsIdent :: Token
Reserved :: !Reserved -> Token
ReservedOp :: !ReservedOp -> Token
CommentLine :: Token
Skip :: Token
Unrecognized :: Token
type HlState = Int
data Reserved
Forall :: Reserved
Exists :: Reserved
Other :: Reserved
data ReservedOp
Or :: ReservedOp
And :: ReservedOp
BackSlash :: ReservedOp
RightArrow :: ReservedOp
DoubleRightArrow :: ReservedOp
Dot :: ReservedOp
OtherOp :: ReservedOp
instance GHC.Show.Show Yi.Lexer.Abella.Token
instance GHC.Classes.Eq Yi.Lexer.Abella.Token
instance GHC.Show.Show Yi.Lexer.Abella.ReservedOp
instance GHC.Classes.Eq Yi.Lexer.Abella.ReservedOp
instance GHC.Show.Show Yi.Lexer.Abella.Reserved
instance GHC.Classes.Eq Yi.Lexer.Abella.Reserved
instance GHC.Base.Functor Yi.Lexer.Abella.AlexLastAcc

module Yi.Lexer.Cabal
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.Cabal.AlexLastAcc

module Yi.Lexer.Clojure
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.Clojure.AlexLastAcc

module Yi.Lexer.Compilation
lexer :: StyleLexerASI HlState Token
data Token
Report :: String -> Int -> Int -> String -> Token
Text :: String -> Token
instance GHC.Show.Show Yi.Lexer.Compilation.Token
instance GHC.Base.Functor Yi.Lexer.Compilation.AlexLastAcc

module Yi.Lexer.GNUMake
lexer :: StyleLexerASI HlState Token
instance GHC.Show.Show Yi.Lexer.GNUMake.HlState
instance GHC.Base.Functor Yi.Lexer.GNUMake.AlexLastAcc

module Yi.Lexer.GitCommit
lexer :: StyleLexerASI HlState Token
type Token = StyleName
instance GHC.Classes.Eq Yi.Lexer.GitCommit.HlState
instance GHC.Show.Show Yi.Lexer.GitCommit.HlState
instance GHC.Base.Functor Yi.Lexer.GitCommit.AlexLastAcc

module Yi.Lexer.Haskell
initState :: HlState

-- | Scan one token. Return (maybe) a token and a new state.
alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput))
tokenToStyle :: Token -> StyleName
tokenToText :: Token -> Maybe String
type TT = Tok Token
isErrorTok :: Token -> Bool
isSpecial :: String -> Token -> Bool
startsLayout :: Token -> Bool
isComment :: Token -> Bool
data Token
Number :: Token
CharTok :: Token
StringTok :: Token
VarIdent :: Token
ConsIdent :: Token
Reserved :: !ReservedType -> Token
ReservedOp :: !OpType -> Token
Special :: Char -> Token
ConsOperator :: String -> Token
Operator :: String -> Token
Comment :: !CommentType -> Token
THQuote :: Token
CppDirective :: Token
Unrecognized :: Token
type HlState = Int
data CommentType
Open :: CommentType
Close :: CommentType
Text :: CommentType
Line :: CommentType
data ReservedType
Hiding :: ReservedType
Qualified :: ReservedType
As :: ReservedType
Import :: ReservedType
Data :: ReservedType
NewType :: ReservedType
Type :: ReservedType
Where :: ReservedType
Let :: ReservedType
In :: ReservedType
Do :: ReservedType
Of :: ReservedType
OtherLayout :: ReservedType
Deriving :: ReservedType
Module :: ReservedType
Forall :: ReservedType
Other :: ReservedType
Class :: ReservedType
Instance :: ReservedType
data OpType
Pipe :: OpType
Equal :: OpType
BackSlash :: OpType
LeftArrow :: OpType
RightArrow :: OpType
DoubleRightArrow :: OpType
DoubleColon :: OpType
DoubleDot :: OpType
Arobase :: OpType
Tilda :: OpType
instance GHC.Show.Show Yi.Lexer.Haskell.Token
instance GHC.Classes.Eq Yi.Lexer.Haskell.Token
instance GHC.Show.Show Yi.Lexer.Haskell.OpType
instance GHC.Classes.Eq Yi.Lexer.Haskell.OpType
instance GHC.Show.Show Yi.Lexer.Haskell.ReservedType
instance GHC.Classes.Eq Yi.Lexer.Haskell.ReservedType
instance GHC.Show.Show Yi.Lexer.Haskell.CommentType
instance GHC.Classes.Eq Yi.Lexer.Haskell.CommentType
instance GHC.Base.Functor Yi.Lexer.Haskell.AlexLastAcc

module Yi.Lexer.JSON
lexer :: StyleLexerASI HlState Token
type Token = StyleName
instance GHC.Base.Functor Yi.Lexer.JSON.AlexLastAcc

module Yi.Lexer.JavaScript
initState :: HlState

-- | Scan one token. Return (maybe) a token and a new state.
alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput))

-- | Takes a <a>Token</a> and returns a style to be used for that type of
--   token.
--   
--   TODO: The <a>elem</a> check is potentially unnecessarily slow. We
--   could split the Const constructor into two different ones, one for
--   builtins and one for others.
tokenToStyle :: Token -> UIStyle -> Style
type TT = Tok Token

-- | The different tokens.
data Token
Unknown :: Token
Res :: !Reserved -> Token
Str :: !String -> Token
Rex :: !String -> Token
Op :: !Operator -> Token
Special :: !Char -> Token
Number :: !String -> Token
ValidName :: !String -> Token
Comment :: !CommentType -> Token
Const :: !String -> Token

-- | The constructors for <tt>Reserved</tt> have an apostrophe as a suffix
--   because <tt>Default</tt> is already used. Also note that
--   <tt>Undefined'</tt> is not intended as some sort of "backup" reserved
--   word for things we don't care about -- it really means the "undefined"
--   built-in in JavaScript.
data Reserved
Break' :: Reserved
Case' :: Reserved
Catch' :: Reserved
Continue' :: Reserved
Default' :: Reserved
Delete' :: Reserved
Do' :: Reserved
Else' :: Reserved
Finally' :: Reserved
For' :: Reserved
Function' :: Reserved
If' :: Reserved
In' :: Reserved
InstanceOf' :: Reserved
New' :: Reserved
Return' :: Reserved
Switch' :: Reserved
This' :: Reserved
Throw' :: Reserved
Try' :: Reserved
TypeOf' :: Reserved
Var' :: Reserved
Void' :: Reserved
While' :: Reserved
With' :: Reserved
True' :: Reserved
False' :: Reserved
Null' :: Reserved
Undefined' :: Reserved

-- | The constructors for <tt>Operator</tt> have an apostrophe as a suffix
--   because e.g. <tt>LT</tt> is already used by <tt>Prelude</tt>.
data Operator
Add' :: Operator
Subtract' :: Operator
Multiply' :: Operator
Divide' :: Operator
Modulo' :: Operator
Increment' :: Operator
Decrement' :: Operator
Assign' :: Operator
AddAssign' :: Operator
SubtractAssign' :: Operator
MultiplyAssign' :: Operator
DivideAssign' :: Operator
ModuloAssign' :: Operator
Equals' :: Operator
NotEquals' :: Operator
GT' :: Operator
GTE' :: Operator
LT' :: Operator
LTE' :: Operator
EqualsType' :: Operator
NotEqualsType' :: Operator
And' :: Operator
Or' :: Operator
Not' :: Operator
BitAnd' :: Operator
BitOr' :: Operator
BitXor' :: Operator
LeftShift' :: Operator
RightShift' :: Operator
RightShiftZ' :: Operator
BitNot' :: Operator
Qualify' :: Operator

-- | <tt>HlState</tt> is 0 when outside of a multi-line comment and -1 when
--   inside one.
type HlState = Int

-- | Prefix operators. NOTE: Add' is also a valid prefix operator, but
--   since it's completely useless in the real world, we don't care about
--   it here. Doing this makes parsing much, much easier.
prefixOperators :: [Operator]

-- | Infix operators.
infixOperators :: [Operator]

-- | Postfix operators.
postfixOperators :: [Operator]
instance GHC.Classes.Eq Yi.Lexer.JavaScript.Token
instance GHC.Show.Show Yi.Lexer.JavaScript.Token
instance GHC.Classes.Eq Yi.Lexer.JavaScript.Operator
instance GHC.Show.Show Yi.Lexer.JavaScript.Operator
instance GHC.Classes.Eq Yi.Lexer.JavaScript.Reserved
instance GHC.Show.Show Yi.Lexer.JavaScript.Reserved
instance GHC.Classes.Eq Yi.Lexer.JavaScript.CommentType
instance GHC.Show.Show Yi.Lexer.JavaScript.CommentType
instance GHC.Base.Functor Yi.Lexer.JavaScript.AlexLastAcc

module Yi.Lexer.Latex
initState :: HlState

-- | Scan one token. Return (maybe) a token and a new state.
alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput))
data Token
Comment :: Token
Text :: Token
Special :: !Char -> Token
Command :: !String -> Token
Begin :: !String -> Token
End :: !String -> Token
NewCommand :: Token
type HlState = Int
tokenToText :: Token -> Maybe [Char]
instance GHC.Classes.Ord Yi.Lexer.Latex.Token
instance GHC.Show.Show Yi.Lexer.Latex.Token
instance GHC.Classes.Eq Yi.Lexer.Latex.Token
instance GHC.Base.Functor Yi.Lexer.Latex.AlexLastAcc

module Yi.Lexer.LiterateHaskell
initState :: HlState

-- | Scan one token. Return (maybe) a token and a new state.
alexScanToken :: (AlexState HlState, AlexInput) -> Maybe (Tok Token, (AlexState HlState, AlexInput))
data HlState
instance GHC.Show.Show Yi.Lexer.LiterateHaskell.HlState
instance GHC.Classes.Eq Yi.Lexer.LiterateHaskell.HlState
instance GHC.Base.Functor Yi.Lexer.LiterateHaskell.AlexLastAcc

module Yi.Lexer.OCaml
lexer :: StyleLexerASI HlState Token
data Token
Number :: Token
CharTok :: Token
StringTok :: Token
VarIdent :: Token
ConsIdent :: Token
IndentReserved :: Token
Reserved :: Token
ReservedOp :: Token
Special :: Char -> Token
ConsOperator :: Token
Operator :: Token
Comment :: Token
instance GHC.Show.Show Yi.Lexer.OCaml.Token
instance GHC.Classes.Eq Yi.Lexer.OCaml.Token
instance GHC.Base.Functor Yi.Lexer.OCaml.AlexLastAcc

module Yi.Lexer.Ott
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.Ott.AlexLastAcc

module Yi.Lexer.SVNCommit
lexer :: StyleLexerASI HlState Token
instance GHC.Show.Show Yi.Lexer.SVNCommit.HlState
instance GHC.Base.Functor Yi.Lexer.SVNCommit.AlexLastAcc

module Yi.Lexer.Whitespace
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.Whitespace.AlexLastAcc

module Yi.Lexer.C
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.C.AlexLastAcc

module Yi.Lexer.Cplusplus
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.Cplusplus.AlexLastAcc

module Yi.Lexer.Java
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.Java.AlexLastAcc

module Yi.Lexer.ObjectiveC
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.ObjectiveC.AlexLastAcc

module Yi.Lexer.Perl
lexer :: StyleLexerASI HlState Token
instance GHC.Show.Show Yi.Lexer.Perl.HlState
instance GHC.Base.Functor Yi.Lexer.Perl.AlexLastAcc

module Yi.Lexer.Python
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.Python.AlexLastAcc

module Yi.Lexer.R
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.R.AlexLastAcc

module Yi.Lexer.Ruby
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.Ruby.AlexLastAcc

module Yi.Lexer.Srmc
lexer :: StyleLexerASI HlState Token
instance GHC.Base.Functor Yi.Lexer.Srmc.AlexLastAcc