{-# LANGUAGE OverloadedStrings #-}
module TextShow.Utils (liftShowbUnaryWith, showbUnaryListWith) where
import TextShow (Builder, TextShow1(..), showbUnaryWith)
liftShowbUnaryWith :: TextShow1 m
=> (Int -> a -> Builder) -> ([a] -> Builder)
-> Builder -> Int -> m a -> Builder
liftShowbUnaryWith sp sl = showbUnaryWith (liftShowbPrec sp sl)
{-# INLINE liftShowbUnaryWith #-}
showbUnaryListWith :: ([a] -> Builder) -> Int -> [a] -> Builder
showbUnaryListWith sl p = showbUnaryWith (const sl) "fromList" p
{-# INLINE showbUnaryListWith #-}