X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FStablePtr.hs;h=9554060c5845c819423e6e2211450031571745aa;hb=b73537367458c1307177d60d44b85516b661bd99;hp=17c219edb21da42625876c6915e3e95b80905a8a;hpb=2fec6a84226c1b78239e99a3883e31faedb62f46;p=ghc-base.git diff --git a/Foreign/StablePtr.hs b/Foreign/StablePtr.hs index 17c219e..9554060 100644 --- a/Foreign/StablePtr.hs +++ b/Foreign/StablePtr.hs @@ -1,4 +1,4 @@ -{-# OPTIONS -fno-implicit-prelude #-} +{-# OPTIONS_GHC -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Foreign.StablePtr @@ -33,6 +33,20 @@ import GHC.Stable import GHC.Err #endif +#ifdef __HUGS__ +import Hugs.StablePtr +#endif + +#ifdef __NHC__ +import NHC.FFI + ( StablePtr + , newStablePtr + , deRefStablePtr + , freeStablePtr + , castStablePtrToPtr + , castPtrToStablePtr + ) +#endif -- $cinterface -- @@ -45,4 +59,4 @@ import GHC.Err -- 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.