Safe Haskell | None |
---|
HERMIT.PrettyPrinter.Common
- type DocH = MDoc HermitMark
- data Attr
- attrP :: AbsolutePathH -> DocH -> DocH
- newtype HTML = HTML String
- coercionColor :: DocH -> DocH
- idColor :: DocH -> DocH
- keywordColor :: DocH -> DocH
- markColor :: SyntaxForColor -> DocH -> DocH
- typeColor :: DocH -> DocH
- data ShowOption
- specialFont :: DocH -> DocH
- data SpecialSymbol
- data SyntaxForColor
- = KeywordColor
- | SyntaxColor
- | IdColor
- | CoercionColor
- | TypeColor
- | LitColor
- | WarningColor
- coreRenders :: [(String, PrettyOptions -> DocH -> String)]
- renderCode :: RenderCode a => PrettyOptions -> DocH -> a
- class (RenderSpecial a, Monoid a) => RenderCode a where
- class RenderSpecial a where
- renderSpecial :: SpecialSymbol -> a
- newtype Unicode = Unicode Char
- type PrettyH a = Translate PrettyC HermitM a DocH
- liftPrettyH :: (ReadBindings c, ReadPath c Crumb) => PrettyOptions -> PrettyH a -> Translate c HermitM a DocH
- data PrettyC = PrettyC {}
- initPrettyC :: PrettyOptions -> PrettyC
- liftPrettyC :: (ReadBindings c, ReadPath c Crumb) => PrettyOptions -> c -> PrettyC
- newtype TranslateDocH a = TranslateDocH {
- unTranslateDocH :: PrettyC -> PrettyH a -> TranslateH a DocH
- data TranslateCoreTCDocHBox = TranslateCoreTCDocHBox (TranslateDocH CoreTC)
- data PrettyOptions = PrettyOptions {}
- updateCoShowOption :: ShowOption -> PrettyOptions -> PrettyOptions
- updateTypeShowOption :: ShowOption -> PrettyOptions -> PrettyOptions
- updateWidthOption :: Int -> PrettyOptions -> PrettyOptions
- hlist :: [MDoc a] -> MDoc a
- vlist :: [MDoc a] -> MDoc a
Documents
Constructors
PathAttr AbsolutePathH | |
Color SyntaxForColor | |
SpecialFont |
attrP :: AbsolutePathH -> DocH -> DocHSource
Instances
Monoid HTML | |
RenderCode HTML | Use css to do the colors - - > type="text/css" - > .hermit-syntax { - > color: red; - > /style |
RenderSpecial HTML |
Colors
coercionColor :: DocH -> DocHSource
keywordColor :: DocH -> DocHSource
markColor :: SyntaxForColor -> DocH -> DocHSource
data ShowOption Source
Instances
specialFont :: DocH -> DocHSource
data SpecialSymbol Source
data SyntaxForColor Source
Constructors
KeywordColor | |
SyntaxColor | |
IdColor | |
CoercionColor | |
TypeColor | |
LitColor | |
WarningColor |
Instances
Renderers
coreRenders :: [(String, PrettyOptions -> DocH -> String)]Source
renderCode :: RenderCode a => PrettyOptions -> DocH -> aSource
class (RenderSpecial a, Monoid a) => RenderCode a whereSource
Methods
Instances
RenderCode HTML | Use css to do the colors - - > type="text/css" - > .hermit-syntax { - > color: red; - > /style |
RenderCode UnicodeTerminal |
class RenderSpecial a whereSource
Methods
renderSpecial :: SpecialSymbol -> aSource
Pretty Printer Traversals
liftPrettyH :: (ReadBindings c, ReadPath c Crumb) => PrettyOptions -> PrettyH a -> Translate c HermitM a DocHSource
Context for PrettyH translations.
Constructors
PrettyC | |
Fields |
liftPrettyC :: (ReadBindings c, ReadPath c Crumb) => PrettyOptions -> c -> PrettyCSource
newtype TranslateDocH a Source
Constructors
TranslateDocH | |
Fields
|
Instances
data TranslateCoreTCDocHBox Source
Constructors
TranslateCoreTCDocHBox (TranslateDocH CoreTC) |
Instances
Pretty Printer Options
data PrettyOptions Source
Constructors
PrettyOptions | |
Fields
|
Instances