X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FStablePtr.hs;h=522c6fc3449c5fcc2058d0b7260e7ab8c4cf85d3;hb=3a7e8de77666fab3f6d2a7fc5c813cbca77ad57d;hp=ad3b6ee2a7e63af054a04f6088cd5d54a9b2c333;hpb=29246dd4eb44d03cc48cbd894821d3c9501d8829;p=ghc-base.git diff --git a/Foreign/StablePtr.hs b/Foreign/StablePtr.hs index ad3b6ee..522c6fc 100644 --- a/Foreign/StablePtr.hs +++ b/Foreign/StablePtr.hs @@ -1,4 +1,5 @@ -{-# OPTIONS -fno-implicit-prelude #-} +{-# LANGUAGE CPP, NoImplicitPrelude #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.StablePtr @@ -17,20 +18,19 @@ module Foreign.StablePtr ( -- * Stable references to Haskell values - StablePtr -- abstract + StablePtr -- abstract , newStablePtr -- :: a -> IO (StablePtr a) , deRefStablePtr -- :: StablePtr a -> IO a , freeStablePtr -- :: StablePtr a -> IO () , castStablePtrToPtr -- :: StablePtr a -> Ptr () , castPtrToStablePtr -- :: Ptr () -> StablePtr a - , -- ** The C-side interface + , -- ** The C-side interface - -- $cinterface + -- $cinterface ) where #ifdef __GLASGOW_HASKELL__ import GHC.Stable -import GHC.Err #endif #ifdef __HUGS__ @@ -59,4 +59,4 @@ import NHC.FFI -- pointers. In fact, they need not even be valid memory addresses. The only -- guarantee provided is that if they are passed back to Haskell land, the -- function 'deRefStablePtr' will be able to reconstruct the --- Haskell value refereed to by the stable pointer. +-- Haskell value referred to by the stable pointer.