#if MIN_VERSION_base(4,5,0)
#endif
module TextShow.Foreign.C.Types () where
import Foreign.C.Types
import TextShow.Classes (TextShow(..))
import TextShow.Data.Floating ()
import TextShow.Data.Integral ()
#if !(MIN_VERSION_base(4,5,0))
import Data.Int
import Data.Text.Lazy.Builder (Builder)
import Data.Word
import Unsafe.Coerce (unsafeCoerce)
# include "HsBaseConfig.h"
#endif
#if MIN_VERSION_base(4,5,0)
deriving instance TextShow CChar
deriving instance TextShow CSChar
deriving instance TextShow CUChar
deriving instance TextShow CShort
deriving instance TextShow CUShort
deriving instance TextShow CInt
deriving instance TextShow CUInt
deriving instance TextShow CLong
deriving instance TextShow CULong
deriving instance TextShow CPtrdiff
deriving instance TextShow CSize
deriving instance TextShow CWchar
deriving instance TextShow CSigAtomic
deriving instance TextShow CLLong
deriving instance TextShow CULLong
deriving instance TextShow CIntPtr
deriving instance TextShow CUIntPtr
deriving instance TextShow CIntMax
deriving instance TextShow CUIntMax
deriving instance TextShow CClock
deriving instance TextShow CTime
deriving instance TextShow CUSeconds
deriving instance TextShow CSUSeconds
deriving instance TextShow CFloat
deriving instance TextShow CDouble
# if MIN_VERSION_base(4,10,0)
deriving instance TextShow CBool
# endif
#else
instance TextShow CChar where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_CHAR -> Builder)
instance TextShow CSChar where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_SIGNED_CHAR -> Builder)
instance TextShow CUChar where
showb = unsafeCoerce (showb :: HTYPE_UNSIGNED_CHAR -> Builder)
instance TextShow CShort where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_SHORT -> Builder)
instance TextShow CUShort where
showb = unsafeCoerce (showb :: HTYPE_UNSIGNED_SHORT -> Builder)
instance TextShow CInt where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_INT -> Builder)
instance TextShow CUInt where
showb = unsafeCoerce (showb :: HTYPE_UNSIGNED_INT -> Builder)
instance TextShow CLong where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_LONG -> Builder)
instance TextShow CULong where
showb = unsafeCoerce (showb :: HTYPE_UNSIGNED_LONG -> Builder)
instance TextShow CPtrdiff where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_PTRDIFF_T -> Builder)
instance TextShow CSize where
showb = unsafeCoerce (showb :: HTYPE_SIZE_T -> Builder)
instance TextShow CWchar where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_WCHAR_T -> Builder)
instance TextShow CSigAtomic where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_SIG_ATOMIC_T -> Builder)
instance TextShow CLLong where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_LONG_LONG -> Builder)
instance TextShow CULLong where
showb = unsafeCoerce (showb :: HTYPE_UNSIGNED_LONG_LONG -> Builder)
instance TextShow CIntPtr where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_INTPTR_T -> Builder)
instance TextShow CUIntPtr where
showb = unsafeCoerce (showb :: HTYPE_UINTPTR_T -> Builder)
instance TextShow CIntMax where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_INTMAX_T -> Builder)
instance TextShow CUIntMax where
showb = unsafeCoerce (showb :: HTYPE_UINTMAX_T -> Builder)
instance TextShow CClock where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_CLOCK_T -> Builder)
instance TextShow CTime where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_TIME_T -> Builder)
# if MIN_VERSION_base(4,4,0)
instance TextShow CUSeconds where
showb = unsafeCoerce (showb :: HTYPE_USECONDS_T -> Builder)
instance TextShow CSUSeconds where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_SUSECONDS_T -> Builder)
# endif
instance TextShow CFloat where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_FLOAT -> Builder)
instance TextShow CDouble where
showbPrec = unsafeCoerce (showbPrec :: Int -> HTYPE_DOUBLE -> Builder)
#endif