: (f a), , Rows. , (f a) Show (f a). , -
instance Rows (f a) => Show (f a) where ...
, . , , , Haskell , , UndecidableInstances.
Haskell , " " 1 . , .
, , , , . , Agda Coq, , .
, ? - Show class Show1 prelude-extras.
class Show1 f where ...
show1 :: (Show1 f, Show a) => f a -> String -- not an instance definition!
instance (Foldable f, Show1 f, Show a) => Rows (f a) where ..., . .
defRRepr :: Show a => a -> [ByteString]
defRRepr = (:[]) . pack . show
Show .
newtype, Haskell , "" .
instance (Foldable f, Show (f a)) => Rows (FoldableRow f a) where
rRepr = const [] . unFR
newtype FoldableRow f a = FR { unFR :: f a } deriving (Show)