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
Synopsis
- 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
|
Instances
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
An OutputType
token together with a NestLevel
. Basically, each
OutputType
keeps track of its own NestLevel
.
Constructors
Output | |
Fields |
Instances
Eq Output Source # | |
Data Output Source # | |
Defined in Text.Pretty.Simple.Internal.Output Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Output -> c Output Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Output Source # toConstr :: Output -> Constr Source # dataTypeOf :: Output -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Output) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Output) Source # gmapT :: (forall b. Data b => b -> b) -> Output -> Output Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Output -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Output -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Output -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Output -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Output -> m Output Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Output -> m Output Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Output -> m Output Source # | |
Read Output Source # | |
Show Output Source # | |
Generic Output Source # | |
type Rep Output Source # | |
Defined in Text.Pretty.Simple.Internal.Output type Rep Output = D1 (MetaData "Output" "Text.Pretty.Simple.Internal.Output" "pretty-simple-2.2.0.1-8wtVJ8ANI1Y6MXsZeB7gq0" False) (C1 (MetaCons "Output" PrefixI True) (S1 (MetaSel (Just "outputNestLevel") SourceUnpack SourceStrict DecidedStrict) (Rec0 NestLevel) :*: S1 (MetaSel (Just "outputOutputType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 OutputType))) |