text-show-3.10.5: Efficient conversion of values into Text

Copyright | (C) 2014-2017 Ryan Scott
License | BSD-style (see the file LICENSE)
Maintainer | Ryan Scott
Stability | Provisional
Portability | GHC
Safe Haskell | None
Language | Haskell2010

TextShow.Generic

Contents

- Generic adapter newtypes
- Generic `show` functions
- Internals
  - `Builder`
  - Strict `Text`
  - Lazy `Text`
  - Other internals

Description

Generic versions of `TextShow` and `TextShow1` class functions, as an alternative to TextShow.TH, which uses Template Haskell. Because there is no `Generic2` class, `TextShow2` cannot be implemented generically.

This implementation is loosely based off of the `Generics.Deriving.Show` module from the `generic-deriving` library.

Since: 2

Synopsis

- newtype FromGeneric a = FromGeneric {
  - fromGeneric :: a
  }
- newtype FromGeneric1 f a = FromGeneric1 {
  - fromGeneric1 :: f a
  }
- genericShowt :: (Generic a, GTextShowT (Rep a ())) => a -> Text
- genericShowtl :: (Generic a, GTextShowTL (Rep a ())) => a -> Text
- genericShowtPrec :: (Generic a, GTextShowT (Rep a ())) => Int -> a -> Text
- genericShowtlPrec :: (Generic a, GTextShowTL (Rep a ())) => Int -> a -> Text
- genericShowtList :: (Generic a, GTextShowT (Rep a ())) => [a] -> Text
- genericShowtlList :: (Generic a, GTextShowTL (Rep a ())) => [a] -> Text
- genericShowb :: (Generic a, GTextShowB (Rep a ())) => a -> Builder
- genericShowbPrec :: (Generic a, GTextShowB (Rep a ())) => Int -> a -> Builder
- genericShowbList :: (Generic a, GTextShowB (Rep a ())) => [a] -> Builder
- genericPrintT :: (Generic a, GTextShowT (Rep a ())) => a -> IO ()
- genericPrintTL :: (Generic a, GTextShowTL (Rep a ())) => a -> IO ()
- genericHPrintT :: (Generic a, GTextShowT (Rep a ())) => Handle -> a -> IO ()
- genericHPrintTL :: (Generic a, GTextShowTL (Rep a ())) => Handle -> a -> IO ()
- genericLiftShowbPrec :: (Generic1 f, GTextShowB1 (Rep1 f)) => (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> f a -> Builder
- genericShowbPrec1 :: (Generic a, Generic1 f, GTextShowB (Rep a ()), GTextShowB1 (Rep1 f)) => Int -> f a -> Builder
- class GTextShowB a where
  - gShowbPrec :: Int -> a -> Builder
- class GTextShowConB a where
  - gShowbPrecCon :: ConType -> Int -> a -> Builder
- class (forall a. TextShow a => GTextShowB (f a)) => GTextShowB1 f where
  - gLiftShowbPrec :: (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> f a -> Builder
- class (forall a. TextShow a => GTextShowConB (f a)) => GTextShowConB1 f where
  - gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> f a -> Builder
- class GTextShowT a where
  - gShowtPrec :: Int -> a -> Text
- class GTextShowConT a where
  - gShowtPrecCon :: ConType -> Int -> a -> Text
- class (forall a. TextShow a => GTextShowT (f a)) => GTextShowT1 f where
  - gLiftShowtPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> f a -> Text
- class (forall a. TextShow a => GTextShowConT (f a)) => GTextShowConT1 f where
  - gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> f a -> Text
- class GTextShowTL a where
  - gShowtlPrec :: Int -> a -> Text
- class GTextShowConTL a where
  - gShowtlPrecCon :: ConType -> Int -> a -> Text
- class (forall a. TextShow a => GTextShowTL (f a)) => GTextShowTL1 f where
  - gLiftShowtlPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> f a -> Text
- class (forall a. TextShow a => GTextShowConTL (f a)) => GTextShowConTL1 f where
  - gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> f a -> Text
- class IsNullary f where
  - isNullary :: f a -> Bool
- data ConType
  - = Rec
  - | Tup
  - | Pref
  - | Inf String

# Generic adapter newtypes

newtype FromGeneric a Source #

An adapter newtype, suitable for `DerivingVia`. The `TextShow` instance for `FromGeneric` leverages a `Generic`-based default. That is,

    showbPrec p (FromGeneric x) = genericShowbPrec p x

Since: 3.7.4

Constructors

FromGeneric |

Fields

- fromGeneric :: a

#### Instances

Instances details

Foldable FromGeneric Source # |

Instance details

Defined in TextShow.Generic

Methods

fold :: Monoid m => FromGeneric m -> m Source #

foldMap :: Monoid m => (a -> m) -> FromGeneric a -> m Source #

foldMap' :: Monoid m => (a -> m) -> FromGeneric a -> m Source #

foldr :: (a -> b -> b) -> b -> FromGeneric a -> b Source #

foldr' :: (a -> b -> b) -> b -> FromGeneric a -> b Source #

foldl :: (b -> a -> b) -> b -> FromGeneric a -> b Source #

foldl' :: (b -> a -> b) -> b -> FromGeneric a -> b Source #

foldr1 :: (a -> a -> a) -> FromGeneric a -> a Source #

foldl1 :: (a -> a -> a) -> FromGeneric a -> a Source #

toList :: FromGeneric a -> [a] Source #

null :: FromGeneric a -> Bool Source #

length :: FromGeneric a -> Int Source #

elem :: Eq a => a -> FromGeneric a -> Bool Source #

maximum :: Ord a => FromGeneric a -> a Source #

minimum :: Ord a => FromGeneric a -> a Source #

sum :: Num a => FromGeneric a -> a Source #

product :: Num a => FromGeneric a -> a Source #

Traversable FromGeneric Source # |
Instance details Defined in TextShow.Generic Methods traverse :: Applicative f => (a -> f b) -> FromGeneric a -> f (FromGeneric b) Source # sequenceA :: Applicative f => FromGeneric (f a) -> f (FromGeneric a) Source # mapM :: Monad m => (a -> m b) -> FromGeneric a -> m (FromGeneric b) Source # sequence :: Monad m => FromGeneric (m a) -> m (FromGeneric a) Source #
Functor FromGeneric Source # |
Instance details Defined in TextShow.Generic Methods fmap :: (a -> b) -> FromGeneric a -> FromGeneric b Source # (<$) :: a -> FromGeneric b -> FromGeneric a Source #
Generic1 FromGeneric Source # |
Instance details Defined in TextShow.Generic Associated Types type Rep1 FromGeneric :: k -> Type Source # Methods from1 :: forall (a :: k). FromGeneric a -> Rep1 FromGeneric a Source # to1 :: forall (a :: k). Rep1 FromGeneric a -> FromGeneric a Source #
Lift a => Lift (FromGeneric a :: Type) Source # |
Instance details Defined in TextShow.Generic Methods lift :: Quote m => FromGeneric a -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => FromGeneric a -> Code m (FromGeneric a) Source #
Data a => Data (FromGeneric a) Source # |

Instance details

Defined in TextShow.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FromGeneric a -> c (FromGeneric a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FromGeneric a) Source #

toConstr :: FromGeneric a -> Constr Source #

dataTypeOf :: FromGeneric a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FromGeneric a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FromGeneric a)) Source #

gmapT :: (forall b. Data b => b -> b) -> FromGeneric a -> FromGeneric a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FromGeneric a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FromGeneric a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> FromGeneric a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FromGeneric a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FromGeneric a -> m (FromGeneric a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FromGeneric a -> m (FromGeneric a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FromGeneric a -> m (FromGeneric a) Source #

Generic (FromGeneric a) Source # |
Instance details Defined in TextShow.Generic Associated Types type Rep (FromGeneric a) :: Type -> Type Source # Methods from :: FromGeneric a -> Rep (FromGeneric a) x Source # to :: Rep (FromGeneric a) x -> FromGeneric a Source #
Read a => Read (FromGeneric a) Source # |
Instance details Defined in TextShow.Generic Methods readsPrec :: Int -> ReadS (FromGeneric a) Source # readList :: ReadS [FromGeneric a] Source # readPrec :: ReadPrec (FromGeneric a) Source # readListPrec :: ReadPrec [FromGeneric a] Source #
Show a => Show (FromGeneric a) Source # |
Instance details Defined in TextShow.Generic Methods showsPrec :: Int -> FromGeneric a -> ShowS Source # show :: FromGeneric a -> String Source # showList :: [FromGeneric a] -> ShowS Source #
Eq a => Eq (FromGeneric a) Source # |
Instance details Defined in TextShow.Generic Methods (==) :: FromGeneric a -> FromGeneric a -> Bool Source # (/=) :: FromGeneric a -> FromGeneric a -> Bool Source #
Ord a => Ord (FromGeneric a) Source # |

Instance details

Defined in TextShow.Generic

Methods

compare :: FromGeneric a -> FromGeneric a -> Ordering Source #

(<) :: FromGeneric a -> FromGeneric a -> Bool Source #

(<=) :: FromGeneric a -> FromGeneric a -> Bool Source #

(>) :: FromGeneric a -> FromGeneric a -> Bool Source #

(>=) :: FromGeneric a -> FromGeneric a -> Bool Source #

max :: FromGeneric a -> FromGeneric a -> FromGeneric a Source #

min :: FromGeneric a -> FromGeneric a -> FromGeneric a Source #

(Generic a, GTextShowB (Rep a ())) => TextShow (FromGeneric a) Source # | Since: 3.7.4

Instance details

Defined in TextShow.Generic

Methods

showbPrec :: Int -> FromGeneric a -> Builder Source #

showb :: FromGeneric a -> Builder Source #

showbList :: [FromGeneric a] -> Builder Source #

showtPrec :: Int -> FromGeneric a -> Text Source #

showt :: FromGeneric a -> Text Source #

showtList :: [FromGeneric a] -> Text Source #

showtlPrec :: Int -> FromGeneric a -> Text Source #

showtl :: FromGeneric a -> Text Source #

showtlList :: [FromGeneric a] -> Text Source #

type Rep1 FromGeneric Source # |
Instance details Defined in TextShow.Generic type Rep1 FromGeneric = D1 ('MetaData "FromGeneric" "TextShow.Generic" "text-show-3.10.5-DiYBJE7O0GlDzAxrPhjwoe" 'True) (C1 ('MetaCons "FromGeneric" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromGeneric") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Rep (FromGeneric a) Source # |
Instance details Defined in TextShow.Generic type Rep (FromGeneric a) = D1 ('MetaData "FromGeneric" "TextShow.Generic" "text-show-3.10.5-DiYBJE7O0GlDzAxrPhjwoe" 'True) (C1 ('MetaCons "FromGeneric" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromGeneric") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

newtype FromGeneric1 f a Source #

An adapter newtype, suitable for `DerivingVia`. The `TextShow1` instance for `FromGeneric1` leverages a `Generic1`-based default. That is,

    liftShowbPrec sp sl p (FromGeneric1 x) = genericLiftShowbPrec sp sl p x

Since: 3.7.4

Constructors

FromGeneric1 |

Fields

- fromGeneric1 :: f a

#### Instances

Instances details

Generic1 (FromGeneric1 f :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Associated Types type Rep1 (FromGeneric1 f) :: k -> Type Source # Methods from1 :: forall (a :: k0). FromGeneric1 f a -> Rep1 (FromGeneric1 f) a Source # to1 :: forall (a :: k0). Rep1 (FromGeneric1 f) a -> FromGeneric1 f a Source #
Lift (f a) => Lift (FromGeneric1 f a :: Type) Source # |
Instance details Defined in TextShow.Generic Methods lift :: Quote m => FromGeneric1 f a -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => FromGeneric1 f a -> Code m (FromGeneric1 f a) Source #
Foldable f => Foldable (FromGeneric1 f) Source # |

Instance details

Defined in TextShow.Generic

Methods

fold :: Monoid m => FromGeneric1 f m -> m Source #

foldMap :: Monoid m => (a -> m) -> FromGeneric1 f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> FromGeneric1 f a -> m Source #

foldr :: (a -> b -> b) -> b -> FromGeneric1 f a -> b Source #

foldr' :: (a -> b -> b) -> b -> FromGeneric1 f a -> b Source #

foldl :: (b -> a -> b) -> b -> FromGeneric1 f a -> b Source #

foldl' :: (b -> a -> b) -> b -> FromGeneric1 f a -> b Source #

foldr1 :: (a -> a -> a) -> FromGeneric1 f a -> a Source #

foldl1 :: (a -> a -> a) -> FromGeneric1 f a -> a Source #

toList :: FromGeneric1 f a -> [a] Source #

null :: FromGeneric1 f a -> Bool Source #

length :: FromGeneric1 f a -> Int Source #

elem :: Eq a => a -> FromGeneric1 f a -> Bool Source #

maximum :: Ord a => FromGeneric1 f a -> a Source #

minimum :: Ord a => FromGeneric1 f a -> a Source #

sum :: Num a => FromGeneric1 f a -> a Source #

product :: Num a => FromGeneric1 f a -> a Source #

Traversable f => Traversable (FromGeneric1 f) Source # |
Instance details Defined in TextShow.Generic Methods traverse :: Applicative f0 => (a -> f0 b) -> FromGeneric1 f a -> f0 (FromGeneric1 f b) Source # sequenceA :: Applicative f0 => FromGeneric1 f (f0 a) -> f0 (FromGeneric1 f a) Source # mapM :: Monad m => (a -> m b) -> FromGeneric1 f a -> m (FromGeneric1 f b) Source # sequence :: Monad m => FromGeneric1 f (m a) -> m (FromGeneric1 f a) Source #
Functor f => Functor (FromGeneric1 f) Source # |
Instance details Defined in TextShow.Generic Methods fmap :: (a -> b) -> FromGeneric1 f a -> FromGeneric1 f b Source # (<$) :: a -> FromGeneric1 f b -> FromGeneric1 f a Source #
(Generic1 f, GTextShowB1 (Rep1 f)) => TextShow1 (FromGeneric1 f) Source # | Since: 3.7.4
Instance details Defined in TextShow.Generic Methods liftShowbPrec :: (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> FromGeneric1 f a -> Builder Source # liftShowbList :: (Int -> a -> Builder) -> ([a] -> Builder) -> [FromGeneric1 f a] -> Builder Source #
(Data (f a), Typeable f, Typeable a) => Data (FromGeneric1 f a) Source # |

Instance details

Defined in TextShow.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FromGeneric1 f a -> c (FromGeneric1 f a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FromGeneric1 f a) Source #

toConstr :: FromGeneric1 f a -> Constr Source #

dataTypeOf :: FromGeneric1 f a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FromGeneric1 f a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FromGeneric1 f a)) Source #

gmapT :: (forall b. Data b => b -> b) -> FromGeneric1 f a -> FromGeneric1 f a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FromGeneric1 f a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FromGeneric1 f a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> FromGeneric1 f a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FromGeneric1 f a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FromGeneric1 f a -> m (FromGeneric1 f a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FromGeneric1 f a -> m (FromGeneric1 f a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FromGeneric1 f a -> m (FromGeneric1 f a) Source #

Generic (FromGeneric1 f a) Source # |
Instance details Defined in TextShow.Generic Associated Types type Rep (FromGeneric1 f a) :: Type -> Type Source # Methods from :: FromGeneric1 f a -> Rep (FromGeneric1 f a) x Source # to :: Rep (FromGeneric1 f a) x -> FromGeneric1 f a Source #
Read (f a) => Read (FromGeneric1 f a) Source # |
Instance details Defined in TextShow.Generic Methods readsPrec :: Int -> ReadS (FromGeneric1 f a) Source # readList :: ReadS [FromGeneric1 f a] Source # readPrec :: ReadPrec (FromGeneric1 f a) Source # readListPrec :: ReadPrec [FromGeneric1 f a] Source #
Show (f a) => Show (FromGeneric1 f a) Source # |
Instance details Defined in TextShow.Generic Methods showsPrec :: Int -> FromGeneric1 f a -> ShowS Source # show :: FromGeneric1 f a -> String Source # showList :: [FromGeneric1 f a] -> ShowS Source #
Eq (f a) => Eq (FromGeneric1 f a) Source # |
Instance details Defined in TextShow.Generic Methods (==) :: FromGeneric1 f a -> FromGeneric1 f a -> Bool Source # (/=) :: FromGeneric1 f a -> FromGeneric1 f a -> Bool Source #
Ord (f a) => Ord (FromGeneric1 f a) Source # |

Instance details

Defined in TextShow.Generic

Methods

compare :: FromGeneric1 f a -> FromGeneric1 f a -> Ordering Source #

(<) :: FromGeneric1 f a -> FromGeneric1 f a -> Bool Source #

(<=) :: FromGeneric1 f a -> FromGeneric1 f a -> Bool Source #

(>) :: FromGeneric1 f a -> FromGeneric1 f a -> Bool Source #

(>=) :: FromGeneric1 f a -> FromGeneric1 f a -> Bool Source #

max :: FromGeneric1 f a -> FromGeneric1 f a -> FromGeneric1 f a Source #

min :: FromGeneric1 f a -> FromGeneric1 f a -> FromGeneric1 f a Source #

(Generic1 f, GTextShowB (Rep1 f a)) => TextShow (FromGeneric1 f a) Source # | Since: 3.10

Instance details

Defined in TextShow.Generic

Methods

showbPrec :: Int -> FromGeneric1 f a -> Builder Source #

showb :: FromGeneric1 f a -> Builder Source #

showbList :: [FromGeneric1 f a] -> Builder Source #

showtPrec :: Int -> FromGeneric1 f a -> Text Source #

showt :: FromGeneric1 f a -> Text Source #

showtList :: [FromGeneric1 f a] -> Text Source #

showtlPrec :: Int -> FromGeneric1 f a -> Text Source #

showtl :: FromGeneric1 f a -> Text Source #

showtlList :: [FromGeneric1 f a] -> Text Source #

type Rep1 (FromGeneric1 f :: k -> Type) Source # |
Instance details Defined in TextShow.Generic type Rep1 (FromGeneric1 f :: k -> Type) = D1 ('MetaData "FromGeneric1" "TextShow.Generic" "text-show-3.10.5-DiYBJE7O0GlDzAxrPhjwoe" 'True) (C1 ('MetaCons "FromGeneric1" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromGeneric1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f)))
type Rep (FromGeneric1 f a) Source # |
Instance details Defined in TextShow.Generic type Rep (FromGeneric1 f a) = D1 ('MetaData "FromGeneric1" "TextShow.Generic" "text-show-3.10.5-DiYBJE7O0GlDzAxrPhjwoe" 'True) (C1 ('MetaCons "FromGeneric1" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromGeneric1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a))))

# Generic `show` functions

`TextShow` instances can be easily defined for data types that are `Generic` instances. If you are using GHC 8.6 or later, the easiest way to do this is to use the `DerivingVia` extension.

    {-# LANGUAGE DeriveGeneric, DerivingVia #-}
    import GHC.Generics
    import TextShow
    import TextShow.Generic

    data D a = D a
      deriving (Generic, Generic1)
      deriving TextShow  via FromGeneric  (D a)
      deriving TextShow1 via FromGeneric1 D

Or, if you are using a version of GHC older than 8.6, one can alternatively define these instances like so:

    instance TextShow a => TextShow (D a) where
        showbPrec = genericShowbPrec

    instance TextShow1 D where
        liftShowbPrec = genericLiftShowbPrec

genericShowt :: (Generic a, GTextShowT (Rep a ())) => a -> Text Source #

A `Generic` implementation of `showt`.

Since: 2

genericShowtl :: (Generic a, GTextShowTL (Rep a ())) => a -> Text Source #

A `Generic` implementation of `showtl`.

Since: 2

genericShowtPrec :: (Generic a, GTextShowT (Rep a ())) => Int -> a -> Text Source #

A `Generic` implementation of `showPrect`.

Since: 2

genericShowtlPrec :: (Generic a, GTextShowTL (Rep a ())) => Int -> a -> Text Source #

A `Generic` implementation of `showtlPrec`.

Since: 2

genericShowtList :: (Generic a, GTextShowT (Rep a ())) => [a] -> Text Source #

A `Generic` implementation of `showtList`.

Since: 2

genericShowtlList :: (Generic a, GTextShowTL (Rep a ())) => [a] -> Text Source #

A `Generic` implementation of `showtlList`.

Since: 2

genericShowb :: (Generic a, GTextShowB (Rep a ())) => a -> Builder Source #

A `Generic` implementation of `showb`.

Since: 2

genericShowbPrec :: (Generic a, GTextShowB (Rep a ())) => Int -> a -> Builder Source #

A `Generic` implementation of `showbPrec`.

Since: 2

genericShowbList :: (Generic a, GTextShowB (Rep a ())) => [a] -> Builder Source #

A `Generic` implementation of `showbList`.

Since: 2

genericPrintT :: (Generic a, GTextShowT (Rep a ())) => a -> IO () Source #

A `Generic` implementation of `printT`.

Since: 2

genericPrintTL :: (Generic a, GTextShowTL (Rep a ())) => a -> IO () Source #

A `Generic` implementation of `printTL`.

Since: 2

genericHPrintT :: (Generic a, GTextShowT (Rep a ())) => Handle -> a -> IO () Source #

A `Generic` implementation of `hPrintT`.

Since: 2

genericHPrintTL :: (Generic a, GTextShowTL (Rep a ())) => Handle -> a -> IO () Source #

A `Generic` implementation of `hPrintTL`.

Since: 2

genericLiftShowbPrec :: (Generic1 f, GTextShowB1 (Rep1 f)) => (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> f a -> Builder Source #

A `Generic1` implementation of `genericLiftShowbPrec`.

Since: 2

genericShowbPrec1 :: (Generic a, Generic1 f, GTextShowB (Rep a ()), GTextShowB1 (Rep1 f)) => Int -> f a -> Builder Source #

A `Generic`/`Generic1` implementation of `showbPrec1`.

Since: 2

# Internals

## `Builder`

class GTextShowB a where Source #

Class of generic representation types that can be converted to a `Builder`. Since: 3.10

Methods

gShowbPrec :: Int -> a -> Builder Source #

#### Instances

Instances details

GTextShowB (V1 p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrec :: Int -> V1 p -> Builder Source #
(GTextShowB (f p), GTextShowB (g p)) => GTextShowB ((f :+: g) p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrec :: Int -> (f :+: g) p -> Builder Source #
(Constructor c, GTextShowConB (f p), IsNullary f) => GTextShowB (C1 c f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrec :: Int -> C1 c f p -> Builder Source #
GTextShowB (f p) => GTextShowB (D1 d f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrec :: Int -> D1 d f p -> Builder Source #

class GTextShowConB a where Source #

Methods

gShowbPrecCon :: ConType -> Int -> a -> Builder Source #

#### Instances

Instances details

TextShow p => GTextShowConB (Par1 p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> Par1 p -> Builder Source #
GTextShowConB (U1 p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> U1 p -> Builder Source #
GTextShowConB (UChar p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> UChar p -> Builder Source #
GTextShowConB (UDouble p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> UDouble p -> Builder Source #
GTextShowConB (UFloat p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> UFloat p -> Builder Source #
GTextShowConB (UInt p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> UInt p -> Builder Source #
GTextShowConB (UWord p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> UWord p -> Builder Source #
(TextShow1 f, TextShow p) => GTextShowConB (Rec1 f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> Rec1 f p -> Builder Source #
(GTextShowConB (f p), GTextShowConB (g p)) => GTextShowConB ((f :*: g) p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> (f :*: g) p -> Builder Source #
TextShow c => GTextShowConB (K1 i c p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> K1 i c p -> Builder Source #
(Selector s, GTextShowConB (f p)) => GTextShowConB (S1 s f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> S1 s f p -> Builder Source #
(TextShow1 f, GTextShowConB (g p)) => GTextShowConB ((f :.: g) p) Source # |
Instance details Defined in TextShow.Generic Methods gShowbPrecCon :: ConType -> Int -> (f :.: g) p -> Builder Source #

class (forall a. TextShow a => GTextShowB (f a)) => GTextShowB1 f where Source #

Methods

gLiftShowbPrec :: (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> f a -> Builder Source #

#### Instances

Instances details

GTextShowB1 (V1 :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrec :: (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> V1 a -> Builder Source #
(GTextShowB1 f, GTextShowB1 g) => GTextShowB1 (f :+: g) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrec :: (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> (f :+: g) a -> Builder Source #
(Constructor c, GTextShowConB1 f, IsNullary f) => GTextShowB1 (C1 c f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrec :: (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> C1 c f a -> Builder Source #
GTextShowB1 f => GTextShowB1 (D1 d f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrec :: (Int -> a -> Builder) -> ([a] -> Builder) -> Int -> D1 d f a -> Builder Source #

class (forall a. TextShow a => GTextShowConB (f a)) => GTextShowConB1 f where Source #

Methods

gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> f a -> Builder Source #

#### Instances

Instances details

GTextShowConB1 Par1 Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> Par1 a -> Builder Source #
GTextShowConB1 (U1 :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> U1 a -> Builder Source #
GTextShowConB1 (UChar :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> UChar a -> Builder Source #
GTextShowConB1 (UDouble :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> UDouble a -> Builder Source #
GTextShowConB1 (UFloat :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> UFloat a -> Builder Source #
GTextShowConB1 (UInt :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> UInt a -> Builder Source #
GTextShowConB1 (UWord :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> UWord a -> Builder Source #
TextShow1 f => GTextShowConB1 (Rec1 f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> Rec1 f a -> Builder Source #
(GTextShowConB1 f, GTextShowConB1 g) => GTextShowConB1 (f :*: g) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> (f :*: g) a -> Builder Source #
TextShow c => GTextShowConB1 (K1 i c :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> K1 i c a -> Builder Source #
(Selector s, GTextShowConB1 f) => GTextShowConB1 (S1 s f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> S1 s f a -> Builder Source #
(TextShow1 f, GTextShowConB1 g) => GTextShowConB1 (f :.: g) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowbPrecCon :: (Int -> a -> Builder) -> ([a] -> Builder) -> ConType -> Int -> (f :.: g) a -> Builder Source #

## Strict `Text`

class GTextShowT a where Source #

Class of generic representation types that can be converted to a `Text`. Since: 3.10

Methods

gShowtPrec :: Int -> a -> Text Source #

#### Instances

Instances details

GTextShowT (V1 p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrec :: Int -> V1 p -> Text Source #
(GTextShowT (f p), GTextShowT (g p)) => GTextShowT ((f :+: g) p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrec :: Int -> (f :+: g) p -> Text Source #
(Constructor c, GTextShowConT (f p), IsNullary f) => GTextShowT (C1 c f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrec :: Int -> C1 c f p -> Text Source #
GTextShowT (f p) => GTextShowT (D1 d f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrec :: Int -> D1 d f p -> Text Source #

class GTextShowConT a where Source #

Methods

gShowtPrecCon :: ConType -> Int -> a -> Text Source #

#### Instances

Instances details

TextShow p => GTextShowConT (Par1 p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> Par1 p -> Text Source #
GTextShowConT (U1 p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> U1 p -> Text Source #
GTextShowConT (UChar p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> UChar p -> Text Source #
GTextShowConT (UDouble p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> UDouble p -> Text Source #
GTextShowConT (UFloat p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> UFloat p -> Text Source #
GTextShowConT (UInt p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> UInt p -> Text Source #
GTextShowConT (UWord p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> UWord p -> Text Source #
(TextShow1 f, TextShow p) => GTextShowConT (Rec1 f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> Rec1 f p -> Text Source #
(GTextShowConT (f p), GTextShowConT (g p)) => GTextShowConT ((f :*: g) p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> (f :*: g) p -> Text Source #
TextShow c => GTextShowConT (K1 i c p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> K1 i c p -> Text Source #
(Selector s, GTextShowConT (f p)) => GTextShowConT (S1 s f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> S1 s f p -> Text Source #
(TextShow1 f, GTextShowConT (g p)) => GTextShowConT ((f :.: g) p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtPrecCon :: ConType -> Int -> (f :.: g) p -> Text Source #

class (forall a. TextShow a => GTextShowT (f a)) => GTextShowT1 f where Source #

Methods

gLiftShowtPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> f a -> Text Source #

#### Instances

Instances details

GTextShowT1 (V1 :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> V1 a -> Text Source #
(GTextShowT1 f, GTextShowT1 g) => GTextShowT1 (f :+: g) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> (f :+: g) a -> Text Source #
(Constructor c, GTextShowConT1 f, IsNullary f) => GTextShowT1 (C1 c f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> C1 c f a -> Text Source #
GTextShowT1 f => GTextShowT1 (D1 d f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> D1 d f a -> Text Source #

class (forall a. TextShow a => GTextShowConT (f a)) => GTextShowConT1 f where Source #

Methods

gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> f a -> Text Source #

#### Instances

Instances details

GTextShowConT1 Par1 Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> Par1 a -> Text Source #
GTextShowConT1 (U1 :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> U1 a -> Text Source #
GTextShowConT1 (UChar :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UChar a -> Text Source #
GTextShowConT1 (UDouble :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UDouble a -> Text Source #
GTextShowConT1 (UFloat :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UFloat a -> Text Source #
GTextShowConT1 (UInt :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UInt a -> Text Source #
GTextShowConT1 (UWord :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UWord a -> Text Source #
TextShow1 f => GTextShowConT1 (Rec1 f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> Rec1 f a -> Text Source #
(GTextShowConT1 f, GTextShowConT1 g) => GTextShowConT1 (f :*: g) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> (f :*: g) a -> Text Source #
TextShow c => GTextShowConT1 (K1 i c :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> K1 i c a -> Text Source #
(Selector s, GTextShowConT1 f) => GTextShowConT1 (S1 s f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> S1 s f a -> Text Source #
(TextShow1 f, GTextShowConT1 g) => GTextShowConT1 (f :.: g) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> (f :.: g) a -> Text Source #

## Lazy `Text`

class GTextShowTL a where Source #

Class of generic representation types that can be converted to a `Text`. Since: 3.10

Methods

gShowtlPrec :: Int -> a -> Text Source #

#### Instances

Instances details

GTextShowTL (V1 p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrec :: Int -> V1 p -> Text Source #
(GTextShowTL (f p), GTextShowTL (g p)) => GTextShowTL ((f :+: g) p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrec :: Int -> (f :+: g) p -> Text Source #
(Constructor c, GTextShowConTL (f p), IsNullary f) => GTextShowTL (C1 c f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrec :: Int -> C1 c f p -> Text Source #
GTextShowTL (f p) => GTextShowTL (D1 d f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrec :: Int -> D1 d f p -> Text Source #

class GTextShowConTL a where Source #

Methods

gShowtlPrecCon :: ConType -> Int -> a -> Text Source #

#### Instances

Instances details

TextShow p => GTextShowConTL (Par1 p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> Par1 p -> Text Source #
GTextShowConTL (U1 p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> U1 p -> Text Source #
GTextShowConTL (UChar p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> UChar p -> Text Source #
GTextShowConTL (UDouble p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> UDouble p -> Text Source #
GTextShowConTL (UFloat p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> UFloat p -> Text Source #
GTextShowConTL (UInt p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> UInt p -> Text Source #
GTextShowConTL (UWord p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> UWord p -> Text Source #
(TextShow1 f, TextShow p) => GTextShowConTL (Rec1 f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> Rec1 f p -> Text Source #
(GTextShowConTL (f p), GTextShowConTL (g p)) => GTextShowConTL ((f :*: g) p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> (f :*: g) p -> Text Source #
TextShow c => GTextShowConTL (K1 i c p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> K1 i c p -> Text Source #
(Selector s, GTextShowConTL (f p)) => GTextShowConTL (S1 s f p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> S1 s f p -> Text Source #
(TextShow1 f, GTextShowConTL (g p)) => GTextShowConTL ((f :.: g) p) Source # |
Instance details Defined in TextShow.Generic Methods gShowtlPrecCon :: ConType -> Int -> (f :.: g) p -> Text Source #

class (forall a. TextShow a => GTextShowTL (f a)) => GTextShowTL1 f where Source #

Methods

gLiftShowtlPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> f a -> Text Source #

#### Instances

Instances details

GTextShowTL1 (V1 :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> V1 a -> Text Source #
(GTextShowTL1 f, GTextShowTL1 g) => GTextShowTL1 (f :+: g) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> (f :+: g) a -> Text Source #
(Constructor c, GTextShowConTL1 f, IsNullary f) => GTextShowTL1 (C1 c f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> C1 c f a -> Text Source #
GTextShowTL1 f => GTextShowTL1 (D1 d f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrec :: (Int -> a -> Text) -> ([a] -> Text) -> Int -> D1 d f a -> Text Source #

class (forall a. TextShow a => GTextShowConTL (f a)) => GTextShowConTL1 f where Source #

Methods

gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> f a -> Text Source #

#### Instances

Instances details

GTextShowConTL1 Par1 Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> Par1 a -> Text Source #
GTextShowConTL1 (U1 :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> U1 a -> Text Source #
GTextShowConTL1 (UChar :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UChar a -> Text Source #
GTextShowConTL1 (UDouble :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UDouble a -> Text Source #
GTextShowConTL1 (UFloat :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UFloat a -> Text Source #
GTextShowConTL1 (UInt :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UInt a -> Text Source #
GTextShowConTL1 (UWord :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> UWord a -> Text Source #
TextShow1 f => GTextShowConTL1 (Rec1 f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> Rec1 f a -> Text Source #
(GTextShowConTL1 f, GTextShowConTL1 g) => GTextShowConTL1 (f :*: g) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> (f :*: g) a -> Text Source #
TextShow c => GTextShowConTL1 (K1 i c :: Type -> Type) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> K1 i c a -> Text Source #
(Selector s, GTextShowConTL1 f) => GTextShowConTL1 (S1 s f) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> S1 s f a -> Text Source #
(TextShow1 f, GTextShowConTL1 g) => GTextShowConTL1 (f :.: g) Source # |
Instance details Defined in TextShow.Generic Methods gLiftShowtlPrecCon :: (Int -> a -> Text) -> ([a] -> Text) -> ConType -> Int -> (f :.: g) a -> Text Source #

## Other internals

class IsNullary f where Source #

Class of generic representation types that represent a constructor with zero or more fields.

Methods

isNullary :: f a -> Bool Source #

#### Instances

Instances details

IsNullary Par1 Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k). Par1 a -> Bool Source #
IsNullary (U1 :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). U1 a -> Bool Source #
IsNullary (UChar :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). UChar a -> Bool Source #
IsNullary (UDouble :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). UDouble a -> Bool Source #
IsNullary (UFloat :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). UFloat a -> Bool Source #
IsNullary (UInt :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). UInt a -> Bool Source #
IsNullary (UWord :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). UWord a -> Bool Source #
IsNullary (Rec1 f :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). Rec1 f a -> Bool Source #
IsNullary (f :*: g :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). (f :*: g) a -> Bool Source #
IsNullary (K1 i c :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). K1 i c a -> Bool Source #
IsNullary f => IsNullary (S1 s f :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). S1 s f a -> Bool Source #
IsNullary (f :.: g :: k -> Type) Source # |
Instance details Defined in TextShow.Generic Methods isNullary :: forall (a :: k0). (f :.: g) a -> Bool Source #

data ConType Source #

Whether a constructor is a record (`Rec`), a tuple (`Tup`), is prefix (`Pref`), or infix (`Inf`).

Since: 2

Constructors

Rec |
Tup |
Pref |
Inf String |

#### Instances

Instances details

Data ConType Source # |

Instance details

Defined in TextShow.Generic

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConType -> c ConType Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConType Source #

toConstr :: ConType -> Constr Source #

dataTypeOf :: ConType -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ConType) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConType) Source #

gmapT :: (forall b. Data b => b -> b) -> ConType -> ConType Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConType -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConType -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ConType -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ConType -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConType -> m ConType Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConType -> m ConType Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConType -> m ConType Source #

Generic ConType Source # |
Instance details Defined in TextShow.Generic Associated Types type Rep ConType :: Type -> Type Source # Methods from :: ConType -> Rep ConType x Source # to :: Rep ConType x -> ConType Source #
Read ConType Source # |
Instance details Defined in TextShow.Generic Methods readsPrec :: Int -> ReadS ConType Source # readList :: ReadS [ConType] Source # readPrec :: ReadPrec ConType Source # readListPrec :: ReadPrec [ConType] Source #
Show ConType Source # |
Instance details Defined in TextShow.Generic Methods showsPrec :: Int -> ConType -> ShowS Source # show :: ConType -> String Source # showList :: [ConType] -> ShowS Source #
Eq ConType Source # |
Instance details Defined in TextShow.Generic Methods (==) :: ConType -> ConType -> Bool Source # (/=) :: ConType -> ConType -> Bool Source #
Ord ConType Source # |
Instance details Defined in TextShow.Generic Methods compare :: ConType -> ConType -> Ordering Source # (<) :: ConType -> ConType -> Bool Source # (<=) :: ConType -> ConType -> Bool Source # (>) :: ConType -> ConType -> Bool Source # (>=) :: ConType -> ConType -> Bool Source # max :: ConType -> ConType -> ConType Source # min :: ConType -> ConType -> ConType Source #
TextShow ConType Source # |

Instance details

Defined in TextShow.Generic

Methods

showbPrec :: Int -> ConType -> Builder Source #

showb :: ConType -> Builder Source #

showbList :: [ConType] -> Builder Source #

showtPrec :: Int -> ConType -> Text Source #

showt :: ConType -> Text Source #

showtList :: [ConType] -> Text Source #

showtlPrec :: Int -> ConType -> Text Source #

showtl :: ConType -> Text Source #

showtlList :: [ConType] -> Text Source #

Lift ConType Source # |
Instance details Defined in TextShow.Generic Methods lift :: Quote m => ConType -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => ConType -> Code m ConType Source #
type Rep ConType Source # |

Instance details

Defined in TextShow.Generic

type Rep ConType = D1 ('MetaData "ConType" "TextShow.Generic" "text-show-3.10.5-DiYBJE7O0GlDzAxrPhjwoe" 'False) ((C1 ('MetaCons "Rec" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Tup" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Pref" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Inf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))