{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module TextShow.Data.Functor.Compose () where
import Data.Functor.Compose (Compose(..))
import TextShow.Classes (TextShow(..), TextShow1(..), showbPrec1, showbUnaryWith)
instance (TextShow1 f, TextShow1 g, TextShow a) => TextShow (Compose f g a) where
showbPrec = showbPrec1
{-# INLINE showbPrec #-}
instance (TextShow1 f, TextShow1 g) => TextShow1 (Compose f g) where
liftShowbPrec sp sl p (Compose x) =
showbUnaryWith (liftShowbPrec (liftShowbPrec sp sl)
(liftShowbList sp sl))
"Compose" p x