pretty-simple-4.1.1.0: pretty printer for data types with a 'Show' instance.
Copyright(c) Dennis Gosnell 2016
LicenseBSD-style (see LICENSE file)
Maintainercdep.illabout@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pretty.Simple.Internal.Expr

Description

 

Documentation

newtype CommaSeparated a Source #

Constructors

CommaSeparated 

Fields

Instances

Instances details
Eq a => Eq (CommaSeparated a) Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Expr

Data a => Data (CommaSeparated a) Source # 
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) #

Show a => Show (CommaSeparated a) Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Expr

Generic (CommaSeparated a) Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Expr

Associated Types

type Rep (CommaSeparated a) :: Type -> Type #

type Rep (CommaSeparated a) Source # 
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.1.0-BT8AU6Jn7o24gHClHYMJh6" 'True) (C1 ('MetaCons "CommaSeparated" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCommaSeparated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))

data Expr Source #

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
Eq Expr Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Expr

Methods

(==) :: Expr -> Expr -> Bool #

(/=) :: Expr -> Expr -> Bool #

Data Expr Source # 
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 #

Show Expr Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Expr

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

Generic Expr Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Expr

Associated Types

type Rep Expr :: Type -> Type #

Methods

from :: Expr -> Rep Expr x #

to :: Rep Expr x -> Expr #

type Rep Expr Source # 
Instance details

Defined in Text.Pretty.Simple.Internal.Expr