| Copyright | (c) Dennis Gosnell 2016 |
|---|---|
| License | BSD-style (see LICENSE file) |
| Maintainer | cdep.illabout@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Text.Pretty.Simple.Internal.Output
Description
- newtype NestLevel = NestLevel {
- unNestLevel :: Int
- data OutputType
- data Output = Output {}
Documentation
Datatype representing how much something is nested.
For example, a NestLevel of 0 would mean an Output token
is at the very highest level, not in any braces.
A NestLevel of 1 would mean that an Output token is in one single pair
of { and }, or [ and ], or \(@ and @\)@.
A NestLevel of 2 would mean that an Output token is two levels of
brackets, etc.
Constructors
| NestLevel | |
Fields
| |
data OutputType Source #
These are the output tokens that we will be printing to the screen.
Constructors
| OutputCloseBrace | This represents the |
| OutputCloseBracket | This represents the |
| OutputCloseParen | This represents the |
| OutputComma | This represents the |
| OutputIndent | This represents an indentation. |
| OutputNewLine | This represents the |
| OutputOpenBrace | This represents the |
| OutputOpenBracket | This represents the |
| OutputOpenParen | This represents the |
| OutputOther !String | This represents some collection of characters that don't fit into any of the other tokens. |
| OutputStringLit !String | This represents a string literal. For instance, |
Instances
| Eq OutputType Source # | |
| Data OutputType Source # | |
| Read OutputType Source # | |
| Show OutputType Source # | |
| IsString OutputType Source # |
|
| Generic OutputType Source # | |
| type Rep OutputType Source # | |
An OutputType token together with a NestLevel. Basically, each
OutputType keeps track of its own NestLevel.
Constructors
| Output | |
Fields | |