X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FMem.hs;h=af96b5dd1c293830369f0f07d4abbae505bff669;hb=HEAD;hp=a6e752c6232efd1b2e7b90cb9093c8f02f62ffa1;hpb=5ec04dcc5ad22095a3e172d7c3fe9d827429673c;p=ghc-base.git diff --git a/System/Mem.hs b/System/Mem.hs index a6e752c..af96b5d 100644 --- a/System/Mem.hs +++ b/System/Mem.hs @@ -1,15 +1,19 @@ +{-# 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 -- Portability : portable -- --- $Id: Mem.hs,v 1.2 2002/02/13 12:17:14 simonmar Exp $ --- -- Memory-related system things. -- ----------------------------------------------------------------------------- @@ -20,6 +24,15 @@ module System.Mem ( import Prelude +#ifdef __HUGS__ +import Hugs.IOExts +#endif + #ifdef __GLASGOW_HASKELL__ -foreign import {-safe-} "performGC" performGC :: IO () +-- | Triggers an immediate garbage collection +foreign import ccall {-safe-} "performMajorGC" performGC :: IO () +#endif + +#ifdef __NHC__ +import NHC.IOExtras (performGC) #endif