version of example using Tomasz Zielonka's technique
[haskell-directory.git] / System / Mem.hs
index 10a908a..39a98da 100644 (file)
@@ -18,6 +18,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