tamarin-prover-utils-1.2.2: Utility library for the tamarin prover.

Copyright | (c) 2011 Simon Meier
License | GPL v3 (see LICENSE)
Maintainer | Simon Meier <iridcode@gmail.com>
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Text.PrettyPrint.Highlight

Contents

- Highlight style
- HighlightDocument class

Description

Pretty-printing with support for highlighting keywords and comments. Currently this module is not functional on itself, but geared towards its use in Text.PrettyPrint.Html.

Synopsis

- data HighlightStyle
  - = Keyword
  - | Comment
  - | Operator
- class Document d => HighlightDocument d where
- comment :: HighlightDocument d => d -> d
- keyword :: HighlightDocument d => d -> d
- operator :: HighlightDocument d => d -> d
- comment_ :: HighlightDocument d => String -> d
- keyword_ :: HighlightDocument d => String -> d
- operator_ :: HighlightDocument d => String -> d
- opParens :: HighlightDocument d => d -> d
- module Text.PrettyPrint.Class

# Highlight style

data HighlightStyle #

Currently we support only keywords, operators, and comments.

Constructors

Keyword |
Comment |
Operator |

Instances

Eq HighlightStyle # |
Methods (==) :: HighlightStyle -> HighlightStyle -> Bool # (/=) :: HighlightStyle -> HighlightStyle -> Bool #
Ord HighlightStyle # |
Methods compare :: HighlightStyle -> HighlightStyle -> Ordering # (<) :: HighlightStyle -> HighlightStyle -> Bool # (<=) :: HighlightStyle -> HighlightStyle -> Bool # (>) :: HighlightStyle -> HighlightStyle -> Bool # (>=) :: HighlightStyle -> HighlightStyle -> Bool # max :: HighlightStyle -> HighlightStyle -> HighlightStyle # min :: HighlightStyle -> HighlightStyle -> HighlightStyle #
Show HighlightStyle # |
Methods showsPrec :: Int -> HighlightStyle -> ShowS # show :: HighlightStyle -> String # showList :: [HighlightStyle] -> ShowS #

# HighlightDocument class

class Document d => HighlightDocument d where #

Minimal complete definition

highlight

Methods

highlight :: HighlightStyle -> d -> d #

Instances

HighlightDocument Doc # |
Methods highlight :: HighlightStyle -> Doc -> Doc #
Document d => HighlightDocument (HtmlDoc d) # |
Methods highlight :: HighlightStyle -> HtmlDoc d -> HtmlDoc d #

comment :: HighlightDocument d => d -> d #

keyword :: HighlightDocument d => d -> d #

operator :: HighlightDocument d => d -> d #

comment_ :: HighlightDocument d => String -> d #

keyword_ :: HighlightDocument d => String -> d #

operator_ :: HighlightDocument d => String -> d #

opParens :: HighlightDocument d => d -> d #

module Text.PrettyPrint.Class