- ( -- Integral types, instances of: Eq, Ord, Num, Read, Show, Enum,
- -- Typeable, Storable, Bounded, Real, Integral, Bits
- CChar(..), CSChar(..), CUChar(..)
- , CShort(..), CUShort(..), CInt(..), CUInt(..)
- , CLong(..), CULong(..), CLLong(..), CULLong(..)
-
- -- Floating types, instances of: Eq, Ord, Num, Read, Show, Enum,
- -- Typeable, Storable, Real, Fractional, Floating, RealFrac, RealFloat
- , CFloat(..), CDouble(..), CLDouble(..)
- ) where
-
-import Data.Bits ( Bits(..) )
-import Data.Int ( Int8, Int16, Int32, Int64 )
-import Data.Word ( Word8, Word16, Word32, Word64 )
-import Data.Dynamic
+ ( -- * Representations of C types
+#ifndef __NHC__
+ -- $ctypes
+
+ -- ** Integral types
+ -- | These types are are represented as @newtype@s of
+ -- types in "Data.Int" and "Data.Word", and are instances of
+ -- 'Prelude.Eq', 'Prelude.Ord', 'Prelude.Num', 'Prelude.Read',
+ -- 'Prelude.Show', 'Prelude.Enum', 'Typeable', 'Storable',
+ -- 'Prelude.Bounded', 'Prelude.Real', 'Prelude.Integral' and
+ -- 'Bits'.
+ CChar, CSChar, CUChar
+ , CShort, CUShort, CInt, CUInt
+ , CLong, CULong
+ , CPtrdiff, CSize, CWchar, CSigAtomic
+ , CLLong, CULLong
+ , CIntPtr, CUIntPtr
+ , CIntMax, CUIntMax
+
+ -- ** Numeric types
+ -- | These types are are represented as @newtype@s of basic
+ -- foreign types, and are instances of
+ -- 'Prelude.Eq', 'Prelude.Ord', 'Prelude.Num', 'Prelude.Read',
+ -- 'Prelude.Show', 'Prelude.Enum', 'Typeable' and 'Storable'.
+ , CClock, CTime, CUSeconds, CSUSeconds
+
+ -- 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
+ -- 'Prelude.Eq', 'Prelude.Ord', 'Prelude.Num', 'Prelude.Read',
+ -- 'Prelude.Show', 'Prelude.Enum', 'Typeable', 'Storable',
+ -- 'Prelude.Real', 'Prelude.Fractional', 'Prelude.Floating',
+ -- 'Prelude.RealFrac' and 'Prelude.RealFloat'.
+ , CFloat, CDouble
+-- GHC doesn't support CLDouble yet
+#ifndef __GLASGOW_HASKELL__
+ , CLDouble
+#endif
+#else
+ -- Exported non-abstractly in nhc98 to fix an interface file problem.
+ CChar(..), CSChar(..), CUChar(..)
+ , CShort(..), CUShort(..), CInt(..), CUInt(..)
+ , CLong(..), CULong(..)
+ , CPtrdiff(..), CSize(..), CWchar(..), CSigAtomic(..)
+ , CLLong(..), CULLong(..)
+ , CClock(..), CTime(..), CUSeconds(..), CSUSeconds(..)
+ , CFloat(..), CDouble(..), CLDouble(..)
+ , CIntPtr(..), CUIntPtr(..), CIntMax(..), CUIntMax(..)
+#endif
+ -- ** Other types
+
+ -- Instances of: Eq and Storable
+ , CFile, CFpos, CJmpBuf
+ ) where
+
+#ifndef __NHC__
+
+import Foreign.Storable
+import Data.Bits ( Bits(..) )
+import Data.Int ( Int8, Int16, Int32, Int64 )
+import Data.Word ( Word8, Word16, Word32, Word64 )
+import {-# SOURCE #-} Data.Typeable