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 |
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.
Instances
Eq NestLevel Source # | |
Data NestLevel Source # | |
Defined in Text.Pretty.Simple.Internal.Output gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NestLevel -> c NestLevel # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NestLevel # toConstr :: NestLevel -> Constr # dataTypeOf :: NestLevel -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NestLevel) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NestLevel) # gmapT :: (forall b. Data b => b -> b) -> NestLevel -> NestLevel # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NestLevel -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NestLevel -> r # gmapQ :: (forall d. Data d => d -> u) -> NestLevel -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NestLevel -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NestLevel -> m NestLevel # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NestLevel -> m NestLevel # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NestLevel -> m NestLevel # | |
Num NestLevel Source # | |
Defined in Text.Pretty.Simple.Internal.Output | |
Ord NestLevel Source # | |
Defined in Text.Pretty.Simple.Internal.Output | |
Read NestLevel Source # | |
Show NestLevel Source # | |
Generic NestLevel Source # | |
type Rep NestLevel Source # | |
Defined in Text.Pretty.Simple.Internal.Output |
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, |
OutputCharLit !String | This represents a char literal. For example, |
OutputNumberLit !String | This represents a numeric literal. For example, |
Instances
An OutputType
token together with a NestLevel
. Basically, each
OutputType
keeps track of its own NestLevel
.
Instances
Eq Output Source # | |
Data Output Source # | |
Defined in Text.Pretty.Simple.Internal.Output gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Output -> c Output # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Output # toConstr :: Output -> Constr # dataTypeOf :: Output -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Output) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Output) # gmapT :: (forall b. Data b => b -> b) -> Output -> Output # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Output -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Output -> r # gmapQ :: (forall d. Data d => d -> u) -> Output -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Output -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Output -> m Output # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Output -> m Output # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Output -> m Output # | |
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-3.2.2.0-93AickV4ocl4iiUojq5JD3" False) (C1 (MetaCons "Output" PrefixI True) (S1 (MetaSel (Just "outputNestLevel") SourceUnpack SourceStrict DecidedStrict) (Rec0 NestLevel) :*: S1 (MetaSel (Just "outputOutputType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 OutputType))) |