module TextShow.Control.Applicative (showbConstPrecWith, showbZipListPrecWith) where
import Control.Applicative (Const(..), ZipList)
import Data.Text.Lazy.Builder (Builder)
import TextShow.Classes (TextShow(showbPrec), TextShow1(..),
TextShow2(..), showbUnaryWith)
import TextShow.Data.List ()
import TextShow.TH.Internal (deriveTextShow, deriveTextShow1)
showbConstPrecWith :: (Int -> a -> Builder) -> Int -> Const a b -> Builder
showbConstPrecWith sp = showbPrecWith2 sp undefined
showbZipListPrecWith :: (Int -> a -> Builder) -> Int -> ZipList a -> Builder
showbZipListPrecWith = showbPrecWith
instance TextShow a => TextShow (Const a b) where
showbPrec = showbPrecWith undefined
instance TextShow a => TextShow1 (Const a) where
showbPrecWith = showbPrecWith2 showbPrec
instance TextShow2 Const where
showbPrecWith2 sp1 _ p (Const x) = showbUnaryWith sp1 "Const" p x
$(deriveTextShow ''ZipList)
$(deriveTextShow1 ''ZipList)