X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FPtr.hs;h=8dd220f7699e1b3e53c4fd2c5c75d8e26a271bc7;hb=85ed71ab833a40f5acfeb4610a0aa3c3c3e1a35b;hp=a394074151f6af53bb8c3e2548f4404af27351d4;hpb=fc6c3c6e5a508b74bed8559c2e4ff6bf74b9ae92;p=ghc-base.git diff --git a/Foreign/Ptr.hs b/Foreign/Ptr.hs index a394074..8dd220f 100644 --- a/Foreign/Ptr.hs +++ b/Foreign/Ptr.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-implicit-prelude #-} +{-# OPTIONS_GHC -XNoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.Ptr @@ -50,7 +50,6 @@ module Foreign.Ptr ( #ifdef __GLASGOW_HASKELL__ import GHC.Ptr -import GHC.IOBase import GHC.Base import GHC.Num import GHC.Read @@ -59,7 +58,7 @@ import GHC.Show import GHC.Enum import GHC.Word ( Word(..) ) -import Data.Int +-- import Data.Int import Data.Word #else import Control.Monad ( liftM ) @@ -67,7 +66,7 @@ import Foreign.C.Types #endif import Data.Bits -import Data.Typeable ( Typeable(..), mkTyCon, mkTyConApp ) +import Data.Typeable import Foreign.Storable ( Storable(..) ) #ifdef __NHC__ @@ -106,12 +105,14 @@ foreign import ccall unsafe "freeHaskellFunctionPtr" # ifdef __GLASGOW_HASKELL__ -- | An unsigned integral type that can be losslessly converted to and from --- @Ptr@. +-- @Ptr@. This type is also compatible with the C99 type @uintptr_t@, and +-- can be marshalled to and from that type safely. INTEGRAL_TYPE(WordPtr,tyConWordPtr,"WordPtr",Word) -- Word and Int are guaranteed pointer-sized in GHC -- | A signed integral type that can be losslessly converted to and from --- @Ptr@. +-- @Ptr@. This type is also compatible with the C99 type @intptr_t@, and +-- can be marshalled to and from that type safely. INTEGRAL_TYPE(IntPtr,tyConIntPtr,"IntPtr",Int) -- Word and Int are guaranteed pointer-sized in GHC