-{-# OPTIONS_GHC -XNoImplicitPrelude #-}
+{-# LANGUAGE CPP
+ , NoImplicitPrelude
+ , MagicHash
+ , GeneralizedNewtypeDeriving
+ #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
-- XXX -fno-warn-unused-binds stops us warning about unused constructors,
-- but really we should just remove them if we don't want them
+
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.C.Types
-- 'Prelude.Show', 'Prelude.Enum', 'Typeable' and 'Storable'.
, CClock, CTime
+ -- extracted from CTime, because we don't want this comment in
+ -- the Haskell 2010 report:
+
+ -- | To convert 'CTime' to 'Data.Time.UTCTime', use the following formula:
+ --
+ -- > posixSecondsToUTCTime (realToFrac :: POSIXTime)
+ --
+
-- ** Floating types
-- | These types are are represented as @newtype@s of
-- 'Prelude.Float' and 'Prelude.Double', and are instances of
, CLLong(..), CULLong(..)
, CClock(..), CTime(..)
, CFloat(..), CDouble(..), CLDouble(..)
+ , CIntPtr(..), CUIntPtr(..), CIntMax(..), CUIntMax(..)
#endif
-- ** Other types
ARITHMETIC_TYPE(CClock,tyConCClock,"CClock",HTYPE_CLOCK_T)
-- | Haskell type representing the C @time_t@ type.
--
--- To convert to a @Data.Time.UTCTime@, use the following formula:
---
--- > posixSecondsToUTCTime (realToFrac :: POSIXTime)
---
ARITHMETIC_TYPE(CTime,tyConCTime,"CTime",HTYPE_TIME_T)
-- FIXME: Implement and provide instances for Eq and Storable
, CPtrdiff(..), CSize(..), CWchar(..), CSigAtomic(..)
, CClock(..), CTime(..)
, CFloat(..), CDouble(..), CLDouble(..)
+ , CIntPtr(..), CUIntPtr(..),CIntMax(..), CUIntMax(..)
, CFile, CFpos, CJmpBuf
, Storable(..)
)
INSTANCE_BITS(CWchar)
INSTANCE_BITS(CSigAtomic)
INSTANCE_BITS(CSize)
+INSTANCE_BITS(CIntPtr)
+INSTANCE_BITS(CUIntPtr)
+INSTANCE_BITS(CIntMax)
+INSTANCE_BITS(CUIntMax)
#endif