multirec-0.7.2: Generic programming for families of recursive datatypes

Portabilitynon-portable
Stabilityexperimental
Maintainergenerics@haskell.org
Safe HaskellSafe-Infered

Generics.MultiRec.Show

Contents

Description

Generic show.

Synopsis

Generic show

class HFunctor phi f => HShow phi f whereSource

The list in the result type allows us to get at the fields of a constructor individually, which in turn allows us to insert additional stuff in between if record notation is used.

Methods

hShowsPrecAlg :: Algebra' phi f [Int -> ShowS]Source

Instances

HShow phi U 
Show a => HShow phi (K a)

For constant types, we make use of the standard show function.

El phi xi => HShow phi (I xi) 
(Constructor c, HShow phi f) => HShow phi (C c f) 
(Show1 f, Traversable f, HShow phi g) => HShow phi (:.: f g) 
HShow phi f => HShow phi (:>: f ix) 
(HShow phi f, HShow phi g) => HShow phi (:*: f g) 
(HShow phi f, HShow phi g) => HShow phi (:+: f g) 

class Show1 f whereSource

Methods

show1 :: f [Int -> ShowS] -> Int -> ShowSSource

Instances

showsPrec :: (Fam phi, HShow phi (PF phi)) => phi ix -> Int -> ix -> ShowSSource

show :: (Fam phi, HShow phi (PF phi)) => phi ix -> ix -> StringSource

Utilities