{-# LANGUAGE CPP #-}
#if MIN_VERSION_base(4,8,0)
{-# LANGUAGE MagicHash #-}
#endif
{-# OPTIONS_GHC -fno-warn-orphans #-}
module TextShow.Numeric.Natural () where
#if MIN_VERSION_base(4,8,0)
import GHC.Integer.GMP.Internals (Integer(..))
import GHC.Natural (Natural(..))
import GHC.Types (Word(..))
#else
import Numeric.Natural (Natural)
#endif
import TextShow.Classes (TextShow(..))
import TextShow.Data.Integral ()
instance TextShow Natural where
#if MIN_VERSION_base(4,8,0)
showbPrec _ (NatS# w#) = showb $ W# w#
showbPrec p (NatJ# bn) = showbPrec p $ Jp# bn
#else
showbPrec p = showbPrec p . toInteger
{-# INLINE showbPrec #-}
#endif