X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FStorable.hs;h=cfe0524d42f4e0660485bf64b2718cd3fe8303b6;hb=c1ca624c2ce1460d64678be5daa195a09d793f9f;hp=979458683c367b3541f7a35e7a88d441795d67b0;hpb=3bc707020c8d0f7a11b652c38d33f1d9c87d3ae7;p=ghc-base.git diff --git a/Foreign/Storable.hs b/Foreign/Storable.hs index 9794586..cfe0524 100644 --- a/Foreign/Storable.hs +++ b/Foreign/Storable.hs @@ -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 "ghcconfig.h" +#include "HsBaseConfig.h" #ifdef __GLASGOW_HASKELL__ import GHC.Storable @@ -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