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 |
- newtype NestLevel = NestLevel {
- _unNestLevel :: Int
- unNestLevel :: Iso' NestLevel 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.
data OutputType Source #
These are the output tokens that we will be printing to the screen.
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, |
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
.