{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module TextShow.Data.Ord () where
import GHC.Exts (Down(..))
import TextShow.Classes ( TextShow(..), TextShow1(..)
, showbPrec1, showbUnaryWith )
import TextShow.TH.Internal (deriveTextShow)
instance TextShow a => TextShow (Down a) where
showbPrec :: Int -> Down a -> Builder
showbPrec = forall (f :: * -> *) a.
(TextShow1 f, TextShow a) =>
Int -> f a -> Builder
showbPrec1
{-# INLINE showbPrec #-}
instance TextShow1 Down where
liftShowbPrec :: forall a.
(Int -> a -> Builder)
-> ([a] -> Builder) -> Int -> Down a -> Builder
liftShowbPrec Int -> a -> Builder
sp [a] -> Builder
_ Int
p (Down a
x) = forall a. (Int -> a -> Builder) -> Builder -> Int -> a -> Builder
showbUnaryWith Int -> a -> Builder
sp Builder
"Down" Int
p a
x
{-# INLINE liftShowbPrec #-}
$(deriveTextShow ''Ordering)