generic-deriving-1.14.1: Generic programming library for generalised deriving.
Safe HaskellTrustworthy
LanguageHaskell2010

Generics.Deriving.Show

Synopsis

Generic show class

class GShow a where #

Minimal complete definition

Nothing

Methods

gshowsPrec :: Int -> a -> ShowS #

default gshowsPrec :: (Generic a, GShow' (Rep a)) => Int -> a -> ShowS #

gshows :: a -> ShowS #

gshow :: a -> String #

gshowList :: [a] -> ShowS #

Instances

Instances details
GShow Bool # 
Instance details

Defined in Generics.Deriving.Show

GShow Char # 
Instance details

Defined in Generics.Deriving.Show

GShow Double # 
Instance details

Defined in Generics.Deriving.Show

GShow Float # 
Instance details

Defined in Generics.Deriving.Show

GShow Int # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Int -> ShowS #

gshows :: Int -> ShowS #

gshow :: Int -> String #

gshowList :: [Int] -> ShowS #

GShow Int8 # 
Instance details

Defined in Generics.Deriving.Show

GShow Int16 # 
Instance details

Defined in Generics.Deriving.Show

GShow Int32 # 
Instance details

Defined in Generics.Deriving.Show

GShow Int64 # 
Instance details

Defined in Generics.Deriving.Show

GShow Integer # 
Instance details

Defined in Generics.Deriving.Show

GShow Natural # 
Instance details

Defined in Generics.Deriving.Show

GShow Ordering # 
Instance details

Defined in Generics.Deriving.Show

GShow Word # 
Instance details

Defined in Generics.Deriving.Show

GShow Word8 # 
Instance details

Defined in Generics.Deriving.Show

GShow Word16 # 
Instance details

Defined in Generics.Deriving.Show

GShow Word32 # 
Instance details

Defined in Generics.Deriving.Show

GShow Word64 # 
Instance details

Defined in Generics.Deriving.Show

GShow () # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> () -> ShowS #

gshows :: () -> ShowS #

gshow :: () -> String #

gshowList :: [()] -> ShowS #

GShow Handle # 
Instance details

Defined in Generics.Deriving.Show

GShow Void # 
Instance details

Defined in Generics.Deriving.Show

GShow Version # 
Instance details

Defined in Generics.Deriving.Show

GShow HandlePosn # 
Instance details

Defined in Generics.Deriving.Show

GShow Fd # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Fd -> ShowS #

gshows :: Fd -> ShowS #

gshow :: Fd -> String #

gshowList :: [Fd] -> ShowS #

GShow ExitCode # 
Instance details

Defined in Generics.Deriving.Show

GShow IOErrorType # 
Instance details

Defined in Generics.Deriving.Show

GShow BufferMode # 
Instance details

Defined in Generics.Deriving.Show

GShow SeekMode # 
Instance details

Defined in Generics.Deriving.Show

GShow IOError # 
Instance details

Defined in Generics.Deriving.Show

GShow All # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> All -> ShowS #

gshows :: All -> ShowS #

gshow :: All -> String #

gshowList :: [All] -> ShowS #

GShow Any # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Any -> ShowS #

gshows :: Any -> ShowS #

gshow :: Any -> String #

gshowList :: [Any] -> ShowS #

GShow Fixity # 
Instance details

Defined in Generics.Deriving.Show

GShow Associativity # 
Instance details

Defined in Generics.Deriving.Show

GShow CChar # 
Instance details

Defined in Generics.Deriving.Show

GShow CSChar # 
Instance details

Defined in Generics.Deriving.Show

GShow CUChar # 
Instance details

Defined in Generics.Deriving.Show

GShow CShort # 
Instance details

Defined in Generics.Deriving.Show

GShow CUShort # 
Instance details

Defined in Generics.Deriving.Show

GShow CInt # 
Instance details

Defined in Generics.Deriving.Show

GShow CUInt # 
Instance details

Defined in Generics.Deriving.Show

GShow CLong # 
Instance details

Defined in Generics.Deriving.Show

GShow CULong # 
Instance details

Defined in Generics.Deriving.Show

GShow CLLong # 
Instance details

Defined in Generics.Deriving.Show

GShow CULLong # 
Instance details

Defined in Generics.Deriving.Show

GShow CBool # 
Instance details

Defined in Generics.Deriving.Show

GShow CFloat # 
Instance details

Defined in Generics.Deriving.Show

GShow CDouble # 
Instance details

Defined in Generics.Deriving.Show

GShow CPtrdiff # 
Instance details

Defined in Generics.Deriving.Show

GShow CSize # 
Instance details

Defined in Generics.Deriving.Show

GShow CWchar # 
Instance details

Defined in Generics.Deriving.Show

GShow CSigAtomic # 
Instance details

Defined in Generics.Deriving.Show

GShow CClock # 
Instance details

Defined in Generics.Deriving.Show

GShow CTime # 
Instance details

Defined in Generics.Deriving.Show

GShow CUSeconds # 
Instance details

Defined in Generics.Deriving.Show

GShow CSUSeconds # 
Instance details

Defined in Generics.Deriving.Show

GShow CIntPtr # 
Instance details

Defined in Generics.Deriving.Show

GShow CUIntPtr # 
Instance details

Defined in Generics.Deriving.Show

GShow CIntMax # 
Instance details

Defined in Generics.Deriving.Show

GShow CUIntMax # 
Instance details

Defined in Generics.Deriving.Show

GShow WordPtr # 
Instance details

Defined in Generics.Deriving.Show

GShow IntPtr # 
Instance details

Defined in Generics.Deriving.Show

GShow IOMode # 
Instance details

Defined in Generics.Deriving.Show

GShow GeneralCategory # 
Instance details

Defined in Generics.Deriving.Show

GShow a => GShow [a] # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> [a] -> ShowS #

gshows :: [a] -> ShowS #

gshow :: [a] -> String #

gshowList :: [[a]] -> ShowS #

GShow a => GShow (Maybe a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Maybe a -> ShowS #

gshows :: Maybe a -> ShowS #

gshow :: Maybe a -> String #

gshowList :: [Maybe a] -> ShowS #

GShow (Ptr a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Ptr a -> ShowS #

gshows :: Ptr a -> ShowS #

gshow :: Ptr a -> String #

gshowList :: [Ptr a] -> ShowS #

GShow (FunPtr a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> FunPtr a -> ShowS #

gshows :: FunPtr a -> ShowS #

gshow :: FunPtr a -> String #

gshowList :: [FunPtr a] -> ShowS #

GShow p => GShow (Par1 p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Par1 p -> ShowS #

gshows :: Par1 p -> ShowS #

gshow :: Par1 p -> String #

gshowList :: [Par1 p] -> ShowS #

GShow (ForeignPtr a) # 
Instance details

Defined in Generics.Deriving.Show

GShow a => GShow (Complex a) # 
Instance details

Defined in Generics.Deriving.Show

GShow a => GShow (Min a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Min a -> ShowS #

gshows :: Min a -> ShowS #

gshow :: Min a -> String #

gshowList :: [Min a] -> ShowS #

GShow a => GShow (Max a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Max a -> ShowS #

gshows :: Max a -> ShowS #

gshow :: Max a -> String #

gshowList :: [Max a] -> ShowS #

GShow a => GShow (First a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> First a -> ShowS #

gshows :: First a -> ShowS #

gshow :: First a -> String #

gshowList :: [First a] -> ShowS #

GShow a => GShow (Last a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Last a -> ShowS #

gshows :: Last a -> ShowS #

gshow :: Last a -> String #

gshowList :: [Last a] -> ShowS #

GShow m => GShow (WrappedMonoid m) # 
Instance details

Defined in Generics.Deriving.Show

GShow a => GShow (ZipList a) # 
Instance details

Defined in Generics.Deriving.Show

GShow a => GShow (Identity a) # 
Instance details

Defined in Generics.Deriving.Show

GShow a => GShow (First a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> First a -> ShowS #

gshows :: First a -> ShowS #

gshow :: First a -> String #

gshowList :: [First a] -> ShowS #

GShow a => GShow (Last a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Last a -> ShowS #

gshows :: Last a -> ShowS #

gshow :: Last a -> String #

gshowList :: [Last a] -> ShowS #

GShow a => GShow (Dual a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Dual a -> ShowS #

gshows :: Dual a -> ShowS #

gshow :: Dual a -> String #

gshowList :: [Dual a] -> ShowS #

GShow a => GShow (Sum a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Sum a -> ShowS #

gshows :: Sum a -> ShowS #

gshow :: Sum a -> String #

gshowList :: [Sum a] -> ShowS #

GShow a => GShow (Product a) # 
Instance details

Defined in Generics.Deriving.Show

GShow a => GShow (Down a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Down a -> ShowS #

gshows :: Down a -> ShowS #

gshow :: Down a -> String #

gshowList :: [Down a] -> ShowS #

GShow a => GShow (NonEmpty a) # 
Instance details

Defined in Generics.Deriving.Show

(Generic a, GShow' (Rep a)) => GShow (Default a) #

For example, with this type:

newtype TestShow = TestShow Bool
  deriving (GShow) via (Default Bool)

gshow for TestShow would produce the same string as gshow for Bool.

In this example, TestShow requires no Generic instance, as the constraint on gshowsPrec from Default Bool is Generic Bool.

In general, when using a newtype wrapper, the instance can be derived via the wrapped type, as here (via Default Bool rather than Default TestShow).

Instance details

Defined in Generics.Deriving.Default

(GShow a, GShow b) => GShow (Either a b) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Either a b -> ShowS #

gshows :: Either a b -> ShowS #

gshow :: Either a b -> String #

gshowList :: [Either a b] -> ShowS #

GShow (U1 p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> U1 p -> ShowS #

gshows :: U1 p -> ShowS #

gshow :: U1 p -> String #

gshowList :: [U1 p] -> ShowS #

GShow (UChar p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> UChar p -> ShowS #

gshows :: UChar p -> ShowS #

gshow :: UChar p -> String #

gshowList :: [UChar p] -> ShowS #

GShow (UDouble p) # 
Instance details

Defined in Generics.Deriving.Show

GShow (UFloat p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> UFloat p -> ShowS #

gshows :: UFloat p -> ShowS #

gshow :: UFloat p -> String #

gshowList :: [UFloat p] -> ShowS #

GShow (UInt p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> UInt p -> ShowS #

gshows :: UInt p -> ShowS #

gshow :: UInt p -> String #

gshowList :: [UInt p] -> ShowS #

GShow (UWord p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> UWord p -> ShowS #

gshows :: UWord p -> ShowS #

gshow :: UWord p -> String #

gshowList :: [UWord p] -> ShowS #

(GShow a, GShow b) => GShow (a, b) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> (a, b) -> ShowS #

gshows :: (a, b) -> ShowS #

gshow :: (a, b) -> String #

gshowList :: [(a, b)] -> ShowS #

(GShow a, GShow b) => GShow (Arg a b) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Arg a b -> ShowS #

gshows :: Arg a b -> ShowS #

gshow :: Arg a b -> String #

gshowList :: [Arg a b] -> ShowS #

GShow (Proxy s) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Proxy s -> ShowS #

gshows :: Proxy s -> ShowS #

gshow :: Proxy s -> String #

gshowList :: [Proxy s] -> ShowS #

GShow (f p) => GShow (Rec1 f p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Rec1 f p -> ShowS #

gshows :: Rec1 f p -> ShowS #

gshow :: Rec1 f p -> String #

gshowList :: [Rec1 f p] -> ShowS #

(GShow a, GShow b, GShow c) => GShow (a, b, c) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> (a, b, c) -> ShowS #

gshows :: (a, b, c) -> ShowS #

gshow :: (a, b, c) -> String #

gshowList :: [(a, b, c)] -> ShowS #

GShow a => GShow (Const a b) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Const a b -> ShowS #

gshows :: Const a b -> ShowS #

gshow :: Const a b -> String #

gshowList :: [Const a b] -> ShowS #

GShow (f a) => GShow (Alt f a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> Alt f a -> ShowS #

gshows :: Alt f a -> ShowS #

gshow :: Alt f a -> String #

gshowList :: [Alt f a] -> ShowS #

GShow c => GShow (K1 i c p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> K1 i c p -> ShowS #

gshows :: K1 i c p -> ShowS #

gshow :: K1 i c p -> String #

gshowList :: [K1 i c p] -> ShowS #

(GShow (f p), GShow (g p)) => GShow ((f :+: g) p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> (f :+: g) p -> ShowS #

gshows :: (f :+: g) p -> ShowS #

gshow :: (f :+: g) p -> String #

gshowList :: [(f :+: g) p] -> ShowS #

(GShow (f p), GShow (g p)) => GShow ((f :*: g) p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> (f :*: g) p -> ShowS #

gshows :: (f :*: g) p -> ShowS #

gshow :: (f :*: g) p -> String #

gshowList :: [(f :*: g) p] -> ShowS #

(GShow a, GShow b, GShow c, GShow d) => GShow (a, b, c, d) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> (a, b, c, d) -> ShowS #

gshows :: (a, b, c, d) -> ShowS #

gshow :: (a, b, c, d) -> String #

gshowList :: [(a, b, c, d)] -> ShowS #

GShow (f p) => GShow (M1 i c f p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> M1 i c f p -> ShowS #

gshows :: M1 i c f p -> ShowS #

gshow :: M1 i c f p -> String #

gshowList :: [M1 i c f p] -> ShowS #

GShow (f (g p)) => GShow ((f :.: g) p) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> (f :.: g) p -> ShowS #

gshows :: (f :.: g) p -> ShowS #

gshow :: (f :.: g) p -> String #

gshowList :: [(f :.: g) p] -> ShowS #

(GShow a, GShow b, GShow c, GShow d, GShow e) => GShow (a, b, c, d, e) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> (a, b, c, d, e) -> ShowS #

gshows :: (a, b, c, d, e) -> ShowS #

gshow :: (a, b, c, d, e) -> String #

gshowList :: [(a, b, c, d, e)] -> ShowS #

(GShow a, GShow b, GShow c, GShow d, GShow e, GShow f) => GShow (a, b, c, d, e, f) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> (a, b, c, d, e, f) -> ShowS #

gshows :: (a, b, c, d, e, f) -> ShowS #

gshow :: (a, b, c, d, e, f) -> String #

gshowList :: [(a, b, c, d, e, f)] -> ShowS #

(GShow a, GShow b, GShow c, GShow d, GShow e, GShow f, GShow g) => GShow (a, b, c, d, e, f, g) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS #

gshows :: (a, b, c, d, e, f, g) -> ShowS #

gshow :: (a, b, c, d, e, f, g) -> String #

gshowList :: [(a, b, c, d, e, f, g)] -> ShowS #

Default definition

gshowsPrecdefault :: (Generic a, GShow' (Rep a)) => Int -> a -> ShowS #

Internal show class

class GShow' f where #

Minimal complete definition

gshowsPrec'

Methods

gshowsPrec' :: Type -> Int -> f a -> ShowS #

isNullary :: f a -> Bool #

Instances

Instances details
GShow' (V1 :: Type -> Type) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type0 -> Int -> V1 a -> ShowS #

isNullary :: V1 a -> Bool #

GShow' (U1 :: Type -> Type) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type0 -> Int -> U1 a -> ShowS #

isNullary :: U1 a -> Bool #

GShow' (UChar :: Type -> Type) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type0 -> Int -> UChar a -> ShowS #

isNullary :: UChar a -> Bool #

GShow' (UDouble :: Type -> Type) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type0 -> Int -> UDouble a -> ShowS #

isNullary :: UDouble a -> Bool #

GShow' (UFloat :: Type -> Type) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type0 -> Int -> UFloat a -> ShowS #

isNullary :: UFloat a -> Bool #

GShow' (UInt :: Type -> Type) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type0 -> Int -> UInt a -> ShowS #

isNullary :: UInt a -> Bool #

GShow' (UWord :: Type -> Type) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type0 -> Int -> UWord a -> ShowS #

isNullary :: UWord a -> Bool #

GShow c => GShow' (K1 i c :: Type -> Type) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type0 -> Int -> K1 i c a -> ShowS #

isNullary :: K1 i c a -> Bool #

(GShow' a, GShow' b) => GShow' (a :+: b) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type -> Int -> (a :+: b) a0 -> ShowS #

isNullary :: (a :+: b) a0 -> Bool #

(GShow' a, GShow' b) => GShow' (a :*: b) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type -> Int -> (a :*: b) a0 -> ShowS #

isNullary :: (a :*: b) a0 -> Bool #

GShow' a => GShow' (M1 D d a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type -> Int -> M1 D d a a0 -> ShowS #

isNullary :: M1 D d a a0 -> Bool #

(GShow' a, Constructor c) => GShow' (M1 C c a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type -> Int -> M1 C c a a0 -> ShowS #

isNullary :: M1 C c a a0 -> Bool #

(Selector s, GShow' a) => GShow' (M1 S s a) # 
Instance details

Defined in Generics.Deriving.Show

Methods

gshowsPrec' :: Type -> Int -> M1 S s a a0 -> ShowS #

isNullary :: M1 S s a a0 -> Bool #