[project @ 2002-09-04 16:51:33 by ross]
[ghc-base.git] / Foreign / C / TypesISO.hs
index 0ecffdb..ae7c21c 100644 (file)
@@ -1,16 +1,14 @@
 {-# OPTIONS -fno-implicit-prelude #-}
 -----------------------------------------------------------------------------
--- 
+-- |
 -- Module      :  Foreign.C.TypesISO
 -- Copyright   :  (c) The FFI task force 2001
--- License     :  BSD-style (see the file libraries/core/LICENSE)
+-- License     :  BSD-style (see the file libraries/base/LICENSE)
 -- 
 -- Maintainer  :  ffi@haskell.org
 -- Stability   :  provisional
 -- Portability :  portable
 --
--- $Id: TypesISO.hs,v 1.3 2002/02/05 17:32:25 simonmar Exp $
---
 -- A mapping of C types defined by the ISO C standard to corresponding Haskell
 -- types. Like CTypes, this is a cool hack...
 --
@@ -23,7 +21,7 @@ module Foreign.C.TypesISO
 
          -- Numeric types, instances of: Eq, Ord, Num, Read, Show, Enum,
          -- Typeable, Storable
-       , CClock(..),   CTime(..),
+       , CClock(..),   CTime(..)
 
           -- Instances of: Eq and Storable
        , CFile,        CFpos,     CJmpBuf
@@ -33,6 +31,7 @@ import Data.Bits      ( Bits(..) )
 import Data.Int
 import Data.Word
 import Data.Dynamic
+import Foreign.Storable
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Base
@@ -41,8 +40,12 @@ import GHC.Real
 import GHC.Show
 import GHC.Read
 import GHC.Num
+#else
+import Control.Monad
+import Foreign.Ptr
 #endif
 
+#include "Dynamic.h"
 #include "CTypes.h"
 
 INTEGRAL_TYPE(CPtrdiff,tyConCPtrdiff,"CPtrdiff",HTYPE_PTRDIFF_T)
@@ -73,10 +76,3 @@ data CJmpBuf = CJmpBuf
 -- C99 types which are still missing include:
 -- intptr_t, uintptr_t, intmax_t, uintmax_t, wint_t, wctrans_t, wctype_t
 
-#include "Dynamic.h"
-INSTANCE_TYPEABLE0(CPtrdiff,cPtrdiffTc,"CPtrdiff")
-INSTANCE_TYPEABLE0(CSize,cSizeTc,"CSize")
-INSTANCE_TYPEABLE0(CWchar,cWcharTc,"CWchar")
-INSTANCE_TYPEABLE0(CSigAtomic,cSigAtomicTc,"CSigAtomic")
-INSTANCE_TYPEABLE0(CClock,cClockTc,"CClock")
-INSTANCE_TYPEABLE0(CTime,cTimeTc,"CTime")