Remove Control.Parallel*, now in package parallel
[haskell-directory.git] / Foreign / Storable.hs
index 4c56b7a..3f05449 100644 (file)
@@ -1,4 +1,4 @@
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS_GHC -fno-implicit-prelude #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Foreign.Storable
@@ -37,7 +37,7 @@ import NHC.FFI (Storable(..),Ptr,FunPtr,StablePtr
 import Control.Monad           ( liftM )
 
 #include "MachDeps.h"
-#include "config.h"
+#include "HsBaseConfig.h"
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Storable
@@ -45,7 +45,6 @@ import GHC.Stable     ( StablePtr )
 import GHC.Num
 import GHC.Int
 import GHC.Word
-import GHC.Stable
 import GHC.Ptr
 import GHC.Float
 import GHC.Err
@@ -54,12 +53,12 @@ import GHC.Base
 #else
 import Data.Int
 import Data.Word
-import Foreign.Ptr
 import Foreign.StablePtr
 #endif
 
 #ifdef __HUGS__
 import Hugs.Prelude
+import Hugs.Ptr
 import Hugs.Storable
 #endif
 
@@ -81,7 +80,7 @@ All marshalling between Haskell and a foreign language ultimately
 boils down to translating Haskell data structures into the binary
 representation of a corresponding data structure of the foreign
 language and vice versa.  To code this marshalling in Haskell, it is
-necessary to manipulate primtive data types stored in unstructured
+necessary to manipulate primitive data types stored in unstructured
 memory blocks.  The class 'Storable' facilitates this manipulation on
 all types for which it is instantiated, which are the standard basic
 types of Haskell, the fixed size @Int@ types ('Int8', 'Int16',
@@ -192,14 +191,14 @@ instance Storable (T) where {                     \
 STORABLE(Char,SIZEOF_INT32,ALIGNMENT_INT32,
         readWideCharOffPtr,writeWideCharOffPtr)
 #elif defined(__HUGS__)
-STORABLE(Char,SIZEOF_CHAR,ALIGNMENT_HSCHAR,
+STORABLE(Char,SIZEOF_HSCHAR,ALIGNMENT_HSCHAR,
         readCharOffPtr,writeCharOffPtr)
 #endif
 
 STORABLE(Int,SIZEOF_HSINT,ALIGNMENT_HSINT,
         readIntOffPtr,writeIntOffPtr)
 
-#ifdef __GLASGOW_HASKELL__
+#ifndef __NHC__
 STORABLE(Word,SIZEOF_HSWORD,ALIGNMENT_HSWORD,
         readWordOffPtr,writeWordOffPtr)
 #endif