| Copyright | (C) 2011-2019 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Text.Trifecta.Highlight
Description
Synopsis
- data Highlight
- data HighlightedRope = HighlightedRope !(IntervalMap Delta Highlight) !Rope
- class HasHighlightedRope c where
- highlightedRope :: Lens' c HighlightedRope
- ropeContent :: Lens' c Rope
- ropeHighlights :: Lens' c (IntervalMap Delta Highlight)
- withHighlight :: Highlight -> Doc AnsiStyle -> Doc AnsiStyle
- data HighlightDoc = HighlightDoc String String HighlightedRope
- class HasHighlightDoc c where
- highlightDoc :: Lens' c HighlightDoc
- docContent :: Lens' c HighlightedRope
- docCss :: Lens' c String
- docTitle :: Lens' c String
- doc :: String -> HighlightedRope -> HighlightDoc
Documentation
Tags used by the TokenParsing highlight combinator.
Instances
| Bounded Highlight | |
| Enum Highlight | |
Defined in Text.Parser.Token.Highlight Methods succ :: Highlight -> Highlight # pred :: Highlight -> Highlight # fromEnum :: Highlight -> Int # enumFrom :: Highlight -> [Highlight] # enumFromThen :: Highlight -> Highlight -> [Highlight] # enumFromTo :: Highlight -> Highlight -> [Highlight] # enumFromThenTo :: Highlight -> Highlight -> Highlight -> [Highlight] # | |
| Read Highlight | |
| Show Highlight | |
| Eq Highlight | |
| Ord Highlight | |
data HighlightedRope Source #
A HighlightedRope is a Rope with an associated IntervalMap full of highlighted regions.
Constructors
| HighlightedRope !(IntervalMap Delta Highlight) !Rope |
Instances
| Monoid HighlightedRope Source # | |
Defined in Text.Trifecta.Highlight Methods mappend :: HighlightedRope -> HighlightedRope -> HighlightedRope # mconcat :: [HighlightedRope] -> HighlightedRope # | |
| Semigroup HighlightedRope Source # | |
Defined in Text.Trifecta.Highlight Methods (<>) :: HighlightedRope -> HighlightedRope -> HighlightedRope # sconcat :: NonEmpty HighlightedRope -> HighlightedRope # stimes :: Integral b => b -> HighlightedRope -> HighlightedRope # | |
| ToMarkup HighlightedRope Source # | |
Defined in Text.Trifecta.Highlight | |
| HasBytes HighlightedRope Source # | |
Defined in Text.Trifecta.Highlight Methods bytes :: HighlightedRope -> Int64 Source # | |
| HasDelta HighlightedRope Source # | |
Defined in Text.Trifecta.Highlight Methods delta :: HighlightedRope -> Delta Source # | |
| HasHighlightedRope HighlightedRope Source # | |
Defined in Text.Trifecta.Highlight | |
class HasHighlightedRope c where Source #
Minimal complete definition
Methods
highlightedRope :: Lens' c HighlightedRope Source #
ropeContent :: Lens' c Rope Source #
ropeHighlights :: Lens' c (IntervalMap Delta Highlight) Source #
Instances
data HighlightDoc Source #
Represents a source file like an HsColour rendered document
Constructors
| HighlightDoc String String HighlightedRope |
Instances
| ToMarkup HighlightDoc Source # | |
Defined in Text.Trifecta.Highlight | |
| HasHighlightDoc HighlightDoc Source # | |
Defined in Text.Trifecta.Highlight | |
class HasHighlightDoc c where Source #
Minimal complete definition
Methods
highlightDoc :: Lens' c HighlightDoc Source #
docContent :: Lens' c HighlightedRope Source #
Instances
doc :: String -> HighlightedRope -> HighlightDoc Source #
Generate an HTML document from a title and a HighlightedRope.