Text.Pretty.Simple.Internal.Expr

pretty-simple-4.1.3.0: pretty printer for data types with a 'Show' instance.

Copyright | (c) Dennis Gosnell 2016
License | BSD-style (see LICENSE file)
Maintainer | cdep.illabout@gmail.com
Stability | experimental
Portability | POSIX
Safe Haskell | Safe-Inferred
Language | Haskell2010

Text.Pretty.Simple.Internal.Expr

Description

# Documentation

newtype CommaSeparated a #

Constructors

CommaSeparated |
Fields unCommaSeparated :: [a]

#### Instances

Instances details

Data a => Data (CommaSeparated a) # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CommaSeparated a -> c (CommaSeparated a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CommaSeparated a) # toConstr :: CommaSeparated a -> Constr # dataTypeOf :: CommaSeparated a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CommaSeparated a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CommaSeparated a)) # gmapT :: (forall b. Data b => b -> b) -> CommaSeparated a -> CommaSeparated a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CommaSeparated a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CommaSeparated a -> r # gmapQ :: (forall d. Data d => d -> u) -> CommaSeparated a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CommaSeparated a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CommaSeparated a -> m (CommaSeparated a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CommaSeparated a -> m (CommaSeparated a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CommaSeparated a -> m (CommaSeparated a) #
Generic (CommaSeparated a) # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr Associated Types
type Rep (CommaSeparated a) |
Instance details Defined in Text.Pretty.Simple.Internal.Expr type Rep (CommaSeparated a) = D1 ('MetaData "CommaSeparated" "Text.Pretty.Simple.Internal.Expr" "pretty-simple-4.1.3.0-Cc8OKns9u1XI0xrwHYW9Yv" 'True) (C1 ('MetaCons "CommaSeparated" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCommaSeparated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))
Methods from :: CommaSeparated a -> Rep (CommaSeparated a) x # to :: Rep (CommaSeparated a) x -> CommaSeparated a #
Show a => Show (CommaSeparated a) # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr Methods showsPrec :: Int -> CommaSeparated a -> ShowS # show :: CommaSeparated a -> String # showList :: [CommaSeparated a] -> ShowS #
Eq a => Eq (CommaSeparated a) # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr Methods (==) :: CommaSeparated a -> CommaSeparated a -> Bool # (/=) :: CommaSeparated a -> CommaSeparated a -> Bool #
type Rep (CommaSeparated a) # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr type Rep (CommaSeparated a) = D1 ('MetaData "CommaSeparated" "Text.Pretty.Simple.Internal.Expr" "pretty-simple-4.1.3.0-Cc8OKns9u1XI0xrwHYW9Yv" 'True) (C1 ('MetaCons "CommaSeparated" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCommaSeparated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))

data Expr #

Constructors

Brackets !(CommaSeparated [Expr]) |
Braces !(CommaSeparated [Expr]) |
Parens !(CommaSeparated [Expr]) |
StringLit !String |
CharLit !String |
NumberLit !String | We could store this as a `Rational`, say, instead of a `String`. However, we will never need to use its value for anything. Indeed, the only thing we will be doing with it is turning it back into a string at some stage, so we might as well cut out the middle man and store it directly like this.
Other !String |

#### Instances

Instances details

Data Expr # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Expr -> c Expr # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Expr # toConstr :: Expr -> Constr # dataTypeOf :: Expr -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Expr) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Expr) # gmapT :: (forall b. Data b => b -> b) -> Expr -> Expr # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expr -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expr -> r # gmapQ :: (forall d. Data d => d -> u) -> Expr -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Expr -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expr -> m Expr # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr -> m Expr # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr -> m Expr #
Generic Expr # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr Associated Types
type Rep Expr |
Instance details Defined in Text.Pretty.Simple.Internal.Expr type Rep Expr = D1 ('MetaData "Expr" "Text.Pretty.Simple.Internal.Expr" "pretty-simple-4.1.3.0-Cc8OKns9u1XI0xrwHYW9Yv" 'False) ((C1 ('MetaCons "Brackets" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommaSeparated [Expr]))) :+: (C1 ('MetaCons "Braces" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommaSeparated [Expr]))) :+: C1 ('MetaCons "Parens" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommaSeparated [Expr]))))) :+: ((C1 ('MetaCons "StringLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "CharLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))) :+: (C1 ('MetaCons "NumberLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "Other" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))))
Methods from :: Expr -> Rep Expr x # to :: Rep Expr x -> Expr #
Show Expr # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr Methods showsPrec :: Int -> Expr -> ShowS # show :: Expr -> String # showList :: [Expr] -> ShowS #
Eq Expr # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr Methods (==) :: Expr -> Expr -> Bool # (/=) :: Expr -> Expr -> Bool #
type Rep Expr # |
Instance details Defined in Text.Pretty.Simple.Internal.Expr type Rep Expr = D1 ('MetaData "Expr" "Text.Pretty.Simple.Internal.Expr" "pretty-simple-4.1.3.0-Cc8OKns9u1XI0xrwHYW9Yv" 'False) ((C1 ('MetaCons "Brackets" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommaSeparated [Expr]))) :+: (C1 ('MetaCons "Braces" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommaSeparated [Expr]))) :+: C1 ('MetaCons "Parens" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommaSeparated [Expr]))))) :+: ((C1 ('MetaCons "StringLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "CharLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))) :+: (C1 ('MetaCons "NumberLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "Other" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))))