pire-0.2.5

Copyright(c) Andreas Reuleaux 2015 - 2018
LicenseBSD2
MaintainerAndreas Reuleaux <rx@a-rx.info>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

PrettyCore

Description

pretty printing: core functions/classes

Synopsis

Documentation

data Ann Source #

Constructors

Keyword

Used for syntactic keywords

Syntax

Syntax punctuation such as commas, parenthesis, and braces

Label

Record labels

Literal

Literals such as integers and strings

Builtin

Builtin types and values

Operator

Operators

TypeA 
Function 
DataA 
BoundV 
Delim 
StringA 

annToAnsiStyle :: Ann -> AnsiStyle Source #

Convert annotations to their corresponding color for syntax highlighting purposes

maybe Connor colors, cf. http://docs.idris-lang.org/en/latest/reference/semantic-highlighting.html

Bound Variable Purple Magenta Keyword Bold Underlined Function Green Green Type Blue Blue Data Red Red Implicit Italic Purple Italic Magenta

data PrettyInfo Source #

Constructors

PI 
Instances
Show PrettyInfo Source # 
Instance details

Defined in PrettyCore

initDI :: PrettyInfo Source #

don't show type annotations

initDI' :: PrettyInfo Source #

show annotations

data Flavor Source #

pretty printing flavors

Constructors

Pretty 
Code 
Level Int 
Instances
Show Flavor Source # 
Instance details

Defined in PrettyCore

class PrettyAnn a where Source #

Minimal complete definition

prettyAnn

Methods

prettyAnn :: MonadReader PrettyInfo m => a -> m (Doc Ann) Source #

Instances
PrettyAnn (Pattern String) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Pattern Text) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Size String) Source # 
Instance details

Defined in PrettySize

PrettyAnn (Size Text) Source # 
Instance details

Defined in PrettySize

PrettyAnn (Pattern String) Source # 
Instance details

Defined in Pretty

PrettyAnn (Pattern Text) Source # 
Instance details

Defined in Pretty

PrettyAnn (Module String String) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Module Text Text) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Decl String String) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Decl Text Text) Source # 
Instance details

Defined in OldPretty

PrettyAnn (ConstructorDef String String) Source # 
Instance details

Defined in OldPretty

PrettyAnn (ConstructorDef Text Text) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Telescope String String) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Telescope Text Text) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Match String String) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Match Text Text) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Annot Text Text) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Expr String String) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Expr Text Text) Source # 
Instance details

Defined in OldPretty

PrettyAnn (Term String String) Source # 
Instance details

Defined in OldPrettyTerm

PrettyAnn (Term Text Text) Source # 
Instance details

Defined in OldPrettyTerm

PrettyAnn (Module String String) Source # 
Instance details

Defined in Pretty

PrettyAnn (Module Text Text) Source # 
Instance details

Defined in Pretty

PrettyAnn (ConstructorDef String String) Source # 
Instance details

Defined in Pretty

PrettyAnn (ConstructorDef Text Text) Source # 
Instance details

Defined in Pretty

PrettyAnn (Telescope String String) Source # 
Instance details

Defined in Pretty

PrettyAnn (Telescope Text Text) Source # 
Instance details

Defined in Pretty

PrettyAnn (Decl String String) Source # 
Instance details

Defined in Pretty

PrettyAnn (Decl Text Text) Source # 
Instance details

Defined in Pretty

PrettyAnn (Arg String String) Source # 
Instance details

Defined in Pretty

PrettyAnn (Arg Text Text) Source # 
Instance details

Defined in Pretty

PrettyAnn (Match String String) Source # 
Instance details

Defined in Pretty

PrettyAnn (Match Text Text) Source # 
Instance details

Defined in Pretty

PrettyAnn (Annot Text Text) Source # 
Instance details

Defined in Pretty

PrettyAnn (Expr String String) Source # 
Instance details

Defined in Pretty

PrettyAnn (Expr Text Text) Source # 
Instance details

Defined in Pretty

PrettyAnn (TT String String) Source # 
Instance details

Defined in PrettyTT

PrettyAnn (TT Text Text) Source # 
Instance details

Defined in PrettyTT

PrettyAnn (Term String String) Source # 
Instance details

Defined in PrettyTerm

PrettyAnn (Term Text Text) Source # 
Instance details

Defined in PrettyTerm

class Pretty2 a where Source #

pretty printing w/ capture avoiding substitution handled differently

here only the classes

Minimal complete definition

pretty2

Methods

pretty2 :: a -> Doc ann Source #

class PrettyAnn2 a where Source #

Minimal complete definition

prettyAnn2

Methods

prettyAnn2 :: a -> Doc Ann Source #

class PrettyCode a where Source #

Minimal complete definition

prettyCode

Methods

prettyCode :: a -> Doc Ann Source #

Instances
PrettyCode (Module String String) Source # 
Instance details

Defined in OldPretty

PrettyCode (Module Text Text) Source # 
Instance details

Defined in OldPretty

PrettyCode (Decl String String) Source # 
Instance details

Defined in OldPretty

PrettyCode (Decl Text Text) Source # 
Instance details

Defined in OldPretty

PrettyCode (Expr String String) Source # 
Instance details

Defined in OldPretty

PrettyCode (Expr Text Text) Source # 
Instance details

Defined in OldPretty

parensIf :: Bool -> Doc ann -> Doc ann Source #

Pretty print parentheses

bracketsIf :: Bool -> Doc ann -> Doc ann Source #

similar: Pretty print brackets