| Copyright | (C) 2011-2015 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Text.Trifecta.Highlight
Description
- data Highlight :: *
- data HighlightedRope = HighlightedRope !(IntervalMap Delta Highlight) !Rope
- class HasHighlightedRope c where
- withHighlight :: Highlight -> Doc -> Doc
- data HighlightDoc = HighlightDoc String String HighlightedRope
- class HasHighlightDoc c where
- doc :: String -> HighlightedRope -> HighlightDoc
Documentation
Tags used by the TokenParsing highlight combinator.
data HighlightedRope Source #
A HighlightedRope is a Rope with an associated IntervalMap full of highlighted regions.
Constructors
| HighlightedRope !(IntervalMap Delta Highlight) !Rope |
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
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.