add System.Posix.Types to default nhc98 build
[haskell-directory.git] / Foreign / Storable.hs
index 3b2823e..c48746b 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
@@ -54,12 +54,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 +81,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',
@@ -199,7 +199,7 @@ STORABLE(Char,SIZEOF_HSCHAR,ALIGNMENT_HSCHAR,
 STORABLE(Int,SIZEOF_HSINT,ALIGNMENT_HSINT,
         readIntOffPtr,writeIntOffPtr)
 
-#ifdef __GLASGOW_HASKELL__
+#ifndef __NHC__
 STORABLE(Word,SIZEOF_HSWORD,ALIGNMENT_HSWORD,
         readWordOffPtr,writeWordOffPtr)
 #endif