X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FMem.hs;h=af96b5dd1c293830369f0f07d4abbae505bff669;hb=HEAD;hp=2bac6122599b714c4e5afc08baddcfcb9eb563d1;hpb=746ef6a7fd71bb1e9ebe3cd107c5f9f79f3b7a68;p=ghc-base.git diff --git a/System/Mem.hs b/System/Mem.hs index 2bac612..af96b5d 100644 --- a/System/Mem.hs +++ b/System/Mem.hs @@ -1,8 +1,14 @@ +{-# LANGUAGE CPP #-} + +#ifdef __GLASGOW_HASKELL__ +{-# LANGUAGE ForeignFunctionInterface #-} +#endif + ----------------------------------------------------------------------------- -- | -- Module : System.Mem -- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/core/LICENSE) +-- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional @@ -18,6 +24,15 @@ module System.Mem ( import Prelude +#ifdef __HUGS__ +import Hugs.IOExts +#endif + #ifdef __GLASGOW_HASKELL__ -foreign import ccall {-safe-} "performGC" performGC :: IO () +-- | Triggers an immediate garbage collection +foreign import ccall {-safe-} "performMajorGC" performGC :: IO () +#endif + +#ifdef __NHC__ +import NHC.IOExtras (performGC) #endif